OSR FX2 INF install on windows XP

Yes I’m a noob. But…yes I’ve searched the forums. But I will admit ignorance, so I may not know how to best search these forums, so go easy on me :stuck_out_tongue:

I have the FX2 hardware here. I’m trying to create an install to work on a clean Windows XP system that has no WDF stuff on it (I’ve not moved to Vista yet).

I’ve looked all over the net, and looked at samples. As best as I can tell, I’m doing this right. I was daring and wanted to write this from scratch, but I think I did well.

So here’s the inf…


; Copyright (c) 2008 Etcher Squared Games

;$ARCH$ cpu type (x86, amd)
;$UMDFVERSION$ corrct umdf version
;$UMDFCOINSTALLERVERSION$ co installer version
;$KMDFCOINSTALLERVERSION$

[Version]
Signature=“$Windows NT$”
;Class=Mouse
;ClassGuid={4d36e96f-e325-11ce-bfc1-08002be10318}
Class=Sample
ClassGuid={78A1C341-4539-11d3-B88D-00C04FAD5171}
Provider=%E2G%
CatalogFile=custom.cat
DriverVer=02/16/2008,6.0.6000.16386
;PnpLockDown=1 ; prevent users from modifying files directly (???)

[SourceDisksNames]
1=%DiskNameDescription%

[SourceDisksFiles]
MyScratchDriver.dll=1
WUDFUpdate_01005.dll=1
WdfCoInstaller01005.dll=1
WinUSBCoInstaller.dll=1

[ClassInstall32]
; ID’s the section directly below
AddReg=AddRegisterySection

[AddRegisterySection]
HKR,%ClassName%
; unknown icon
HKR,Icon,“-18”

; this specifies where files are to go in this install
[DestinationDirs]
; specifies that by default all files go to %windows%/system32/drivers/*guid*
; I made this guid just so that I will not ever collide with other files
UMDriverCopy=12,UMDF ; copy to driversMdf
CoInstallersDir=11

[UMDriverCopy]
MyScratchDriver.dll

[CoInstallersDir]
WUDFUpdate_01005.dll
WdfCoInstaller01005.dll
WinUSBCoInstaller.dll

[Manufacturer] ; this specifies “models” sections
%E2G%=E2GModelsSection,ntx86 ; arch gets replaced by the cpu type

; the “famous” “modles” section
[E2GModelsSection.ntx86] ; this sections says ONLY for this specific CPU
; cool name = “DDInstall” section name, usb unique id for THIS specific hardware
%OSRFx2Device%=OSRFx2DeviceInstallSection,USB\VID_0547&PID_1002&REV_0000

; where things start to get good
; ddinstall
[OSRFx2DeviceInstallSection.ntx86]
Include=winusb.inf
Needs=WINUSB.NT
DriverVer=01/25/2008,2.3.4.5
CopyFiles=UMDriverCopy

; wdf specific, umdf specific items
[E2GModelsSection.Wdf]
KmdfService=WINUSB, WinUsb_Install
UmdfDispatcher=WinUsb
UmdfService=TheFX2Server,TheFX2Server_WDFInstall
UmdfServiceOrder=TheFX2Server

[WinUSB_Install]
KmdfLibraryVersion=1.5

[TheFX2Server_WDFInstall]
UmdfLibraryVersion=1.5.0
DriverCLSID=“{97eb6f84-3285-494b-9f3f-824d7473cf95}”
ServiceBinary = “%12%\UMDF\MyScratchDriver.dll”

[OSRFx2DeviceInstallSection.ntx86.Services]
Include=winusb.inf
AddService=WUDFRd,0x000001fa,WUDFRD_ServiceInstall
AddService=WinUSB,0x000001f8,WinUSB_ServiceInstall

[WUDFRD_ServiceInstall]
DisplayName = %WudfRdDisplayName%
ServiceType=1
StartType=3
ErrorControl=1
ServiceBinary=%12%\WUDFRd.sys
LoadOrderGroup = Base

[WinUSB_ServiceInstall]
DisplayName = %WinUSB_SvcDesc%
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %12%\WinUSB.sys

[OSRFx2DeviceInstallSection.ntx86.HW]
AddReg=OsrUsb_Device_AddReg

[OsrUsb_Device_AddReg]
HKR,“LowerFilters”,0x00010008,“WinUsb” ; FLG_ADDREG_TYPE_MULTI_SZ | FLG_ADDREG_APPEND

[OSRFx2DeviceInstallSection.ntx86.CoInstallers]
AddReg=CoInstallers_AddReg
CopyFiles=CoInstallersDir

[CoInstallers_AddReg]
HKR,CoInstallers32,0x00010000, \
“WUDFUpdate_01005.dll”, \
“WinUSBCoInstaller.dll”, \
“WdfCoInstaller01005.dll,WdfCoInstaller”

[Strings]
WinUSB_SvcDesc=“Microsoft WinUSB Driver”
E2G=“Etcher Squared Games”
DiskNameDescription=“customdisk”
ClassName=“customtype”
OSRFx2Device=“coolness osr fx2 play device”
WudfRdDisplayName=“Windows Driver Foundation - User-mode Driver Framework Reflector”


And now setupapi.log after setting log value to FF (for max logging)

[2008/02/16 09:40:23 6056.908]
#-198 Command line processed: “C:\WINDOWS\system32\mmc.exe” C:\WINDOWS\system32\devmgmt.msc /s
#I060 Set selected driver.
#-019 Searching for hardware ID(s): usb\vid_0547&pid_1002&rev_0000,usb\vid_0547&pid_1002
#-018 Searching for compatible ID(s): usb\class_ff&subclass_00&prot_00,usb\class_ff&subclass_00,usb\class_ff
#I022 Found “USB\VID_0547&PID_1002&REV_0000” in C:\WINDOWS\inf\oem45.inf; Device: “coolness osr fx2 play device”; Driver: “coolness osr fx2 play device”; Provider: “Etcher Squared Games”; Mfg: “Etcher Squared Games”; Section name: “OSRFx2DeviceInstallSection”.
#I087 Driver node not trusted, rank changed from 0x00000000 to 0x00008000.
#I023 Actual install section: [OSRFx2DeviceInstallSection.NTx86]. Rank: 0x00008000. Effective driver date: 01/25/2008.
#-019 Searching for hardware ID(s): usb\vid_0547&pid_1002&rev_0000,usb\vid_0547&pid_1002
#-018 Searching for compatible ID(s): usb\class_ff&subclass_00&prot_00,usb\class_ff&subclass_00,usb\class_ff
#-019 Searching for hardware ID(s): usb\vid_0547&pid_1002&rev_0000,usb\vid_0547&pid_1002
#-018 Searching for compatible ID(s): usb\class_ff&subclass_00&prot_00,usb\class_ff&subclass_00,usb\class_ff
#-019 Searching for hardware ID(s): usb\vid_0547&pid_1002&rev_0000,usb\vid_0547&pid_1002
#-018 Searching for compatible ID(s): usb\class_ff&subclass_00&prot_00,usb\class_ff&subclass_00,usb\class_ff
#I022 Found “USB\VID_0547&PID_1002&REV_0000” in c:\data\scratch\install\MyScratch.inf; Device: “coolness osr fx2 play device”; Driver: “coolness osr fx2 play device”; Provider: “Etcher Squared Games”; Mfg: “Etcher Squared Games”; Section name: “OSRFx2DeviceInstallSection”.
#I087 Driver node not trusted, rank changed from 0x00000000 to 0x00008000.
#I023 Actual install section: [OSRFx2DeviceInstallSection.NTx86]. Rank: 0x00008000. Effective driver date: 01/25/2008.
#-124 Doing copy-only install of “USB\VID_0547&PID_1002\5&1FBB5FC0&0&1”.
#E360 An unsigned or incorrectly signed file “c:\data\scratch\install\custom.cat” for driver “coolness osr fx2 play device” will be installed (Policy=Ignore). Error 0x800b0100: No signature was present in the subject.
#W187 Install failed, attempting to restore original files.
#E360 An unsigned or incorrectly signed file “c:\data\scratch\install\custom.cat” for driver “coolness osr fx2 play device” will be installed (Policy=Ignore). Error 0x800b0100: No signature was present in the subject.
#-024 Copying file “c:\data\scratch\install\MyScratchDriver.dll” to “C:\WINDOWS\system32\DRIVERS\UMDF\MyScratchDriver.dll”.
#E360 An unsigned or incorrectly signed file “c:\data\scratch\install\MyScratchDriver.dll” for driver “coolness osr fx2 play device” will be installed (Policy=Ignore). Error 0x800b0100: No signature was present in the subject.
#-336 Copying file “c:\data\scratch\install\WUDFUpdate_01005.dll” to “C:\WINDOWS\system32\WUDFUpdate_01005.dll” via temporary file “C:\WINDOWS\system32\SET91C.tmp”.
#E360 An unsigned or incorrectly signed file “c:\data\scratch\install\WUDFUpdate_01005.dll” for driver “coolness osr fx2 play device” will be installed (Policy=Ignore). Error 0x800b0100: No signature was present in the subject.
#-336 Copying file “c:\data\scratch\install\WdfCoInstaller01005.dll” to “C:\WINDOWS\system32\WdfCoInstaller01005.dll” via temporary file “C:\WINDOWS\system32\SET91E.tmp”.
#E360 An unsigned or incorrectly signed file “c:\data\scratch\install\WdfCoInstaller01005.dll” for driver “coolness osr fx2 play device” will be installed (Policy=Ignore). Error 0x800b0100: No signature was present in the subject.
#-336 Copying file “c:\data\scratch\install\WinUSBCoInstaller.dll” to “C:\WINDOWS\system32\WinUSBCoInstaller.dll” via temporary file “C:\WINDOWS\system32\SET920.tmp”.
#E360 An unsigned or incorrectly signed file “c:\data\scratch\install\WinUSBCoInstaller.dll” for driver “coolness osr fx2 play device” will be installed (Policy=Ignore). Error 0x800b0100: No signature was present in the subject.
#-166 Device install function: DIF_REGISTER_COINSTALLERS.
#I056 Coinstallers registered.
#-166 Device install function: DIF_INSTALLINTERFACES.
#-011 Installing section [OSRFx2DeviceInstallSection.NTx86.Interfaces] from “c:\data\scratch\install\myscratch.inf”.
#I054 Interfaces installed.
#-166 Device install function: DIF_INSTALLDEVICE.
#E151 Coinstaller 1 of 3 failed. Error 0xe0000101: The required section was not found in the INF.


If I comment out the WUDF and WDF coinstallers, it goes further and then I get other errors, but I don’t care about that right now. I just want to know what those coinstallers seemingly aren’t working.

The WDK documentation doesn’t say anything about additional sections that I need for those coinstallers.

Oh maybe I should include this: I made a convenient batch file to run within a build development. And I should also mention I’m building in the Vista Checked environment because I read that even if building for XP to use this environment. And I’ve tried Free build with no additional success.
Ok here’s the batch


cls
del .\install*.* /q
del .\result*.* /q
del .\result\htm*.* /q
build -cZg
mkdir install
mkdir result
copy .\objchk_wlh_x86\i386*.dll .\install
copy .\objchk_wlh_x86\i386*.inf .\install
copy C:\WinDDK\6000\redist\wdf\x86*.* .\install
copy C:\WinDDK\6000\redist\winusb\x86*.* .\install
“C:\Program Files\Microsoft Winqual Submission Tool 2\Inf2Cat” /driver:C:\data\scratch\install\ /os:XP_X86
C:\WinDDK\6000\tools\chkinf\chkinf .\install*.inf /l .\result\inftext.txt /o .\result\htm

The idea being clean up old files, build the new one, copy needed files to a nice convenient single location called “install”, build the cat file, and run the chkinf (which only gives errors about not able to find “winusb.inf” and warnings since it doesn’t see references to the wdf file…eh ok, here’s that file too


.\install\MyScratch.inf: FAILED
NTLOG REPORT--------------
Total Lines: 136 |
Total Errors: 2 |

Total Warnings: 5
Line 63: ERROR: (E22.1.1002) Unable to include winusb.inf. Note that only system provided INFs may be specified with the INCLUDE directive.
Line 87: ERROR: (E22.1.1002) Unable to include winusb.inf. Note that only system provided INFs may be specified with the INCLUDE directive.
Line 0: WARNING: (W22.1.9998) NOTE: The ChkInf tool does not verify the WDF sections and directives of the INF file.
Line 12: WARNING: (W22.1.2215) Class Sample (ClassGUID {78A1C341-4539-11d3-B88D-00C04FAD5171}) is unrecognized.
Line 69: WARNING: (W22.1.2083) Section [E2GMODELSSECTION.WDF] not referenced
Line 76: WARNING: (W22.1.2083) Section [WINUSB_INSTALL] not referenced
Line 80: WARNING: (W22.1.2083) Section [THEFX2SERVER_WDFINSTALL] not referenced

I’m sure just one character is wrong. And I’m missing it. I just need another pair of eyes. I’ve also read through almost all of the microsoft press book “Developing Drivers with the WDF” (I’m a geek, it was a fun read)

Ok, so, what’s run in this file? ty

what’s “wrong” with this file…sorry, got distracted towards the end.
(is there no way to edit existing posts?)

Guys…my apologies. I have this curse that once I post a problem I figure it out not long after.
I just discovered setupact.log which gave some more detail. I had my WDF section mislabed

before
[E2GModelsSection.Wdf]

after
[OSRFx2DeviceInstallSection.ntx86.Wdf]

and now it’s working…“working” it seems stuck on “WinUSBCoInstaller.dll” at the moment, but I’m not concerned ATM. I’ll deal with that later. I figured I’d post a reply for future reference

xxxxx@hotmail.com wrote:

I have the FX2 hardware here. I’m trying to create an install to work on a clean Windows XP system that has no WDF stuff on it (I’ve not moved to Vista yet).

; the “famous” “modles” section
[E2GModelsSection.ntx86] ; this sections says ONLY for this specific CPU
; cool name = “DDInstall” section name, usb unique id for THIS specific hardware
%OSRFx2Device%=OSRFx2DeviceInstallSection,USB\VID_0547&PID_1002&REV_0000

Before you get too far, allow me to point out that you *MUST NOT*
release a product into the wild using the stock Cypress VID and PID
(which is what you have here). You must go apply to the USB
Implementor’s Forum (www.usb.org) for your own USB vendor id. We have
already had one vendor get a driver signed and placed in the Windows
Driver Library using 0547/1002, and it caused untold grief for everyone
else trying to do Cypress development.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

NONONONONO of course not.
Besides, why would I want to release this FX2 sample device anyway? :stuck_out_tongue:

I’m just teaching myself how do write drivers and since the microsoft press book talks a lot about this fx2 device, I decided to get it.

Besides, unless I’m missing something, don’t I HAVE to use this VID/PID combination in order to work with this fx2? If I put anything else the os won’t recognize this as a valid driver for that hardware right?

That and I don’t have $4000 atm to get my own vendor ID.

But I assure you, I will not release this. It will only remain on my computer.

No, given that NTDEV and NTFSD are *really* mailing lists with front-end interfaces provided by NNTP and web forum software… Once you author it and hit “post”, it’s gone.

The VID/PID is how setup matches your driver to the hardware. You either use this VID/PID to play with the FX2 board, or you change the USB Config ROM to put some other VID/PID. Either way.

Tim was just trying to forestall a recurrence of the disaster we had with a vendor releasing a real product – and even LOGOing it – with the Cypress demo board VID/PID.

Peter
OSR

xxxxx@hotmail.com wrote:

NONONONONO of course not.
Besides, why would I want to release this FX2 sample device anyway? :stuck_out_tongue:

That’s good thinking, but the fact is that others before you have done
exactly that…

Besides, unless I’m missing something, don’t I HAVE to use this VID/PID combination in order to work with this fx2? If I put anything else the os won’t recognize this as a valid driver for that hardware right?

The VID and PID are just part of the descriptors in the firmware. You
can set them to whatever you want.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

According to the document, the firmware is permanent. How do I change the vid/pid?

xxxxx@hotmail.com wrote:

According to the document, the firmware is permanent. How do I change
the vid/pid?

By either changing the firmware, or by loading and running different
board software during run-time. Should be E-Z (read: “easy”).

(Instead of giving a lecture and this way completely taking the fun from
you finding out for yourself, I’ll give just hints, OK?)

HINT002: “use OSRFX2 with GOOGLE”

HINT003: HINT001 was already embedded above.

very funny
Problem though, I’ve found ezloader and ez-usb and some Xcelerator development kit.
The odd thing is, I’ve only found documents on these items. There’s not been any actual TOOLS. There was one nice 5 page pdf talking about building the cypress driver to change vid/pid, but I don’t actually HAVE that code and I’ve not found it ANYWHERE.

Long run…doesn’t matter, so long as I am able to connect.

xxxxx@hotmail.com wrote:

very funny Problem though, I’ve found ezloader and ez-usb and some
Xcelerator development kit. The odd thing is, I’ve only found
documents on these items. There’s not been any actual TOOLS. There
was one nice 5 page pdf talking about building the cypress driver to
change vid/pid, but

I don’t actually HAVE that code and I’ve not found it ANYWHERE.

OK. Let’s see what I can find.

(1) Google “OSR USB FX2”
Match #1 “NEWS:OSR’s USB-FX2 Learning Kit – …”
http://www.osronline.com/article.cfm?article=382

Quote “The OSR USB FX2 Learning Kit is based on the very popular and
well-known Cypress Semiconductor USB FX2 chipset. The board supports
both high-speed and full-speed operation. In addition to the mandatory
control endpoint (endpoint 0), the board implements three other endpoints:”

(2) Looking at www.osronline.com, Downloads, “Sample Driver for USB FX2
Learning Kit”, comment section:

“[…]You’ve seen the firmware for bulkloop in the FX2 kit? You’ve
pretty much seen the firmware for our device…[…]”

(3) Google “OSRFX2”
Match #1 “OSR USB FX2 Learning Kit Project”
http://osrfx2.sourceforge.net/

=> OK, this is a driver for non-Windows hosts. Fine.

The board picture says “Cypress CY7C68013”
Bingo! This is the actual chip used on the IOSR2 board.
(Note: I needed this hint… YOU have the board and can READ what’s
printed on the IC! BTW, in the OSR store there is also an excellent
board picture.)

Also on the picture is “Jumpered for OSR USB FX2 Learning Kit firmware.
Unjumpered for “raw” device (download via ez-loader).”

But somewhere the documentation of the used chip/set must also be… ah!
now that’s what I call “service”:

(4) => “Resource Links Cypress FX2”
http://www.cypress.com/portal/server.pt?space=CommunityPage&control=SetCommunity&CommunityID=209&PageID=215&gid=9&fid=14&category=All&showall=false
=> CY7C68013
Aha. So OSR used an “Enhanced 8051” with USB.
This explains why the VID/PID is from Cypress.

On the Cypress web site:
Home > Products > Universal Serial Bus > USB High-Speed Peripherals >
CY7C68013A > Summary

=> Download Datasheet and Errata…
=> Overview
“EZ-USB FX2LP™ USB Microcontroller”
Features
… (LONG LIST) …
cy68013

=> Related Materials
=> Developer Kits
“CY3684 EZ-USB FX2LP Development Kit [18 Oct, 2005]”
=> Reference Designs
=> Software and Drivers

From the Cypress site:
EZLoader “The EZ Loader Driver described is a template that peripheral
designers can use to create a custom driver that knows how to download
their firmware to their specific device.” => that explains why there is
only samples, source code and APP notes

“CY4618 and CY3685 EZ-USB NX2LP™ Programming Utility Software [18
Apr, 2005]
The Cypress EZ-USB NX2LP™ Programming Utility is an application
specifically designed to download vendor configuration parameters to
NX2LP NAND memory devices connected to the Cypress EZ-USB NX2LP NAND
Flash Controller. These NAND memory devices…”
(705kb Download of
“cy4618_and_cy3685_ez_usb_nx2lp_tm__programming_utility_software_13.zip”)

(5) OSR online store, OSR USB FX2 Learning Kit (V2) page:
“As with all products and services from OSR, support for your new device
is just a click away. Email us at xxxxx@osr.com if you require
assistance.”

=> Possibly they would have sent you the firmware files and a loader.
If you had asked nicely.

Now that’s quite a lot of resources.

Long run…doesn’t matter, so long as I am able to connect.

Yes, you are right… doesn’t matter. Don’t bother.
Probably better if you don’t mess with firmware at all.

Hopefully this mail can help someone else - who is actually really
interested in it - to build his/her own firmware. -H

If you’re getting serious about development on the ez-usb platform, to the point of having worked completely through the examples that use the OSR FX2, then I would suggest getting the Cypress evaluation kit. It comes with a demo version of the Keil tools that can be used to program the board (which solves the vid/pid problem) and has a lot more functionality. It’s not terribly expensive, usually around $500 usd. I have the OSR board, and had the Cypress kit and found them to complement each other. I’m sure there are other kits that are worth having as well. In particular, if you know that your target is not going to be the Cypress part I strongly advise getting your manufactures evaluation kit.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@hotmail.com
Sent: Friday, February 22, 2008 7:42 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] OSR FX2 INF install on windows XP

very funny
Problem though, I’ve found ezloader and ez-usb and some Xcelerator development kit.
The odd thing is, I’ve only found documents on these items. There’s not been any actual TOOLS. There was one nice 5 page pdf talking about building the cypress driver to change vid/pid, but I don’t actually HAVE that code and I’ve not found it ANYWHERE.

Long run…doesn’t matter, so long as I am able to connect.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Samuel Robinson wrote:

If you’re getting serious about development on the ez-usb platform, to the point of having worked completely through the examples that use the OSR FX2, then I would suggest getting the Cypress evaluation kit. It comes with a demo version of the Keil tools that can be used to program the board (which solves the vid/pid problem) and has a lot more functionality. It’s not terribly expensive, usually around $500 usd. I have the OSR board, and had the Cypress kit and found them to complement each other. I’m sure there are other kits that are worth having as well. In particular, if you know that your target is not going to be the Cypress part I strongly advise getting your manufactures evaluation kit.

This is excellent advice. We have a couple of the QuickUSB FX2
experimenter’s kits, and we have found a surprisingly large number of
uses for them, for hardware experiments, driver experiments, USB
experiments, bandwidth experiments, etc. When we’re starting to develop
a USB device for a third party, we can even use the QuickUSB as a
prototype. By setting up the descriptors and some loopback firmware, we
can get pretty close to a simulation of the final device. Very useful.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.