2020-11-17 07:05 PM
Hello,
Have been using STM32-STLink tool for years and years. Yesterday I down-loaded the installer for STM32Cube and ran the program on my laptop(win 7 64 bit). It fails when running(as part of some internal script) dpinst_amd64.exe. This is located in the following directory:
C:\Program Files (x86)\STMicroelectronics\STM32Cube\STM32CubeProgrammer\Drivers\stsw-link009_v3. Note that the above program is called from a bat file also in that directory.
There are 3 inf files that are each attempted to be "installed" (along with matching .cat files). When the above program has concluded it launches a dialog showing the results. In my case the last item always fails. This corresponds to:
STLink_VCP.inf
stlinkvcp_x64.cat
I was able to install the cube program on another win 7 box in my possession. I used the same exact file when doing the install. On the problem machine I have uninstalled and re-tried installation several times (as administrator). I do not have a STLink dongle connected. If I start the program (after a "failed" install), I get the Java message box:
"Cube Programmer_API or one of its dependencies is missing. Please try to reinstall the program or check your Java Architecture"
I have java setup in my path and when I ask for the version I get:
java -version
openJDK version "1.8.0_242-release"
OpenJDK Runtime Environment <build 1.8.0_242_release-1644-b01>
Open JDK 64-Bit Server VM <build 25.242-bo1, mixed mode>
I am not sure if I have one problem here or two.
Any suggestions welcome.
Thanks!
2020-11-18 03:27 AM
Do you have KB4579311 installed?
-- pa
2020-11-18 08:11 AM
No, this is a win 7 machine. KB4578311 applies to win 10 machines.
2020-11-18 08:53 AM
Can you locate \windows\inf\setupapi.dev.log and look for any error message relevant to installation of this driver?
> I am not sure if I have one problem here or two.
Three. The bonus one is Win7 going out of mainstream support, and lack of native USB 3.0 drivers.
-- pa
2020-11-18 09:36 AM
Hi,
Most of the entries in the setupapi.dev.log file end in success. However, as you suspected, there are several that result in Failure. These are all related to an attempt to install the VCP drivers. Specifically, it appears that usbser.sys is missing from the C:\windows\system32\drivers directory. See below for an example of one of the fails.
I find that I have several copies of usbser.sys on my PC in various locations with dates ranging from 2009 to 2016. Is it advisable to just place the most recent one in the C:\windows\system32\drivers directory? If not, where should I obtain this file and or package?
Thanks!
>>> [Import Driver Package - c:\program files (x86)\stmicroelectronics\stm32cube\stm32cubeprogrammer\drivers\stsw-link009_v3\stlink_vcp.inf]
>>> Section start 2020/11/17 14:24:05.323
cmd: "C:\Program Files (x86)\STMicroelectronics\STM32Cube\STM32CubeProgrammer\Drivers\stsw-link009_v3\/dpinst_amd64.exe"
sto: Importing driver package into Driver Store:
sto: Driver Store = C:\windows\System32\DriverStore (Online | 6.1.7601)
sto: Driver Package = c:\program files (x86)\stmicroelectronics\stm32cube\stm32cubeprogrammer\drivers\stsw-link009_v3\stlink_vcp.inf
sto: Architecture = amd64
sto: Locale Name = neutral
sto: Flags = 0x00000000
sto: Copying driver package files to 'C:\Users\bartj\AppData\Local\Temp\{5452439b-9a48-08fb-b2d3-3b08d4d4ec38}'.
inf: Opened INF: 'c:\program files (x86)\stmicroelectronics\stm32cube\stm32cubeprogrammer\drivers\stsw-link009_v3\stlink_vcp.inf' ([strings])
inf: Opened INF: 'C:\windows\inf\mdmcpq.inf' ([strings])
!!! sto: Driver package references a missing external file 'C:\windows\system32\drivers\usbser.sys'. Error = 0x00000002
!!! sto: Failed to retrieve driver package copy files. Error = 0x00000002
!!! sto: Failed to get list of driver package files. Error = 0x00000002, Filename = c:\program files (x86)\stmicroelectronics\stm32cube\stm32cubeprogrammer\drivers\stsw-link009_v3\stlink_vcp.inf
<<< Section end 2020/11/17 14:24:05.402
<<< [Exit status: FAILURE(0x00000002)]
2020-11-18 10:19 AM
The usbser.sys is an "official" component of Win7, so generally the latest version available from Windows Update should be the best.
Seems that Windows thinks that usbser is installed, but in fact the sys file is deleted.
Try to reinstall usbser from Windows update - if it still is available for Win7.
It is quicker to do than to explain, maybe your IT person will be able to help.
-- pa
2020-11-18 10:26 AM
I have had updates turned off for several years. I will take a look at what I need to do in order to get up get things updated such that a recent version of usbser.sys gets installed. Will update here upon new findings.
Thanks again
2020-11-19 09:47 AM
I was able to have windows install updates. However it did not place file usbser.sys anywhere new. I then moved the most recent copy of usbser.sys to:
C:\windows\system32\drivers\. Un-installed STMCube and then re-installed STMCube resulted in a claimed "successful" installation(it found the previously missing usbser.sys).
However, when I start STMCube, it puts up the message box:
Any suggestions? Thanks!
2020-11-19 09:49 AM
Looks like my pasted image did not come through in the previous post....
its a dialog that says:
"Cube Programmer_API or one of its dependencies is missing. Please try to reinstall the program or check your Java Architecture"
I have java setup in my path and when I ask for the version I get:
java -version
openJDK version "1.8.0_242-release"
OpenJDK Runtime Environment <build 1.8.0_242_release-1644-b01>
Open JDK 64-Bit Server VM <build 25.242-bo1, mixed mode>
Any suggestions? Thanks!
2020-11-19 10:42 AM
I was able to resolve this problem. Apparently STMCube looks for java on its own (does not use the entry specified iny PATH). I had an old version of java that I was not aware of in program files (x86). I simply rename the directory and now all is well. I found this solution in:
Thanks all!