Page 1 of 1

CM3 Flashing on Windows 7 broken?

Posted: Mon Apr 10, 2017 3:57 pm
by bioe007
I'm following the instructions to flash a CM3 module here:
https://www.raspberrypi.org/documentati ... lashing.md

I'm using:
* Windows 7
* Pi CM3
* Pi compute developer board

What I did:
* put cm3 in carrier board
* run installer
* connect carrier to PC
* apply power to carrier board
* observe windows 'installing driver blah blah'
* CM3+carrier board is detected as 'Xbox S controller'
* open terminal and run 'Compute Module Boot/rpiboot.exe'
* observe error:

Code: Select all

Waiting for BCM283x ...
Initialised device correctly
Found serial number 0
Found serial = 0: writing file ./usbbootcode.bin
Failed to write correct length, returned 0
I tried this first by double-clicking the exe, then from git-bash, cygwin, powershell and cmd prompts. All with supervisor permissions. Always I get the same error.

After which the CM3 seems to be out to lunch. Now sometimes running rpiboot.exe basically does nothing and it just sits at the 'Waiting for BCM...' line. Similarly described here:
https://github.com/raspberrypi/usbboot/issues/12

I notice that the instructions list testing on Windows 10, and XP. Notably, Windows 7 is not mentioned.

Questions:

1. Is it more likely that this is a Win7 issue or a problem with the bootcode.bin file?
2. Has anyone used this on Windows 7 with success?
3. If it's the bootcode.bin, do I just fetch that from a different commit and try again?
3. How can I get my CM3 out of zombie-land and try it again?

Thanks

Re: CM3 Flashing on Windows 7 broken?

Posted: Mon Apr 10, 2017 5:04 pm
by bioe007
I'm wondering if the fact the compute module + carrier board is being detected as a 'Xbox One S Controller' is causing at least some of the problem - seems like a likely culprit.

So now I've taken these steps:
* uninstalled the pi boot
* uninstalled the CM module from Windows Device Manager
* Disabled automatic driver installation
* reboot
* download the driver only (link from instructions page)
* power up CM3+carrier connected to PC
* note recognized as 'BCM2170' in other devices
* Select 'update driver' 'have disk' etc etc...

Here the included driver seems broken. Windows says it can't find any drivers in the directory.

I notice the *.inf file there is at least one typo, where a string doesn't have a close-quote. So I fix that.

Now windows just says in the dialog window:
"unable to install your BCM2710 Boot. Windows could not find driver software for your device ... "
no_bcm2170boot_install.jpg
no_bcm2170boot_install.jpg (31.43 KiB) Viewed 4853 times
+edit+

setupapi.app.log - parts from when trying to install the driver:

Code: Select all

[Device Install Log]
     OS Version = 6.1.7601
     Service Pack = 1.0
     Suite = 0x0100
     ProductType = 1
     Architecture = amd64

[BeginLog]

[Boot Session: 2017/04/10 09:53:12.610]

>>>  [Build Driver List - USB\VID_0A5C&PID_2764&MI_00\7&315B8DB7&0&0000]
>>>  Section start 2017/04/10 10:28:07.574
      cmd: "C:\Windows\system32\mmc.exe" C:\Windows\system32\devmgmt.msc
     cpy: Policy is set to make all digital signatures equal.
<<<  Section end 2017/04/10 10:28:07.576
<<<  [Exit status: SUCCESS]


>>>  [Build Driver List - USB\VID_0A5C&PID_2764&MI_00\7&315B8DB7&0&0000]
>>>  Section start 2017/04/10 10:28:07.589
      cmd: "C:\Windows\system32\mmc.exe" C:\Windows\system32\devmgmt.msc
     cpy: Policy is set to make all digital signatures equal.
<<<  Section end 2017/04/10 10:28:07.593
<<<  [Exit status: SUCCESS]


>>>  [DIF_SELECTBESTCOMPATDRV - USB\VID_0A5C&PID_2764&MI_00\7&315B8DB7&0&0000]
>>>  Section start 2017/04/10 10:28:07.593
      cmd: "C:\Windows\system32\mmc.exe" C:\Windows\system32\devmgmt.msc
!    dvi: Selecting driver failed(0xe0000228)
!    dvi: Default installer: failed!
!    dvi: Error 0xe0000228: There are no compatible drivers for this device.
<<<  Section end 2017/04/10 10:28:07.596
<<<  [Exit status: FAILURE(0xe0000228)]

Re: CM3 Flashing on Windows 7 broken?

Posted: Fri Aug 11, 2017 4:12 pm
by wittend
I have done exactly these same things, and gotten exactly the same results. Win7 showed XBox driver, removed that, etc.

I tried again with another CM3 after exorcising all of the drivers rpiboot.exe, etc.

I also did this under Mint (ubuntu) 18.1 (not VM - separate machine) with equally unhappy results.

Really frustrated!

Re: CM3 Flashing on Windows 7 broken?

Posted: Thu Sep 07, 2017 3:23 am
by bioe007
Hi,

In order to reliably flash my CM3 modules I had my PC upgraded to Windows 10, then it seemed to work flawlessly. Unfortunately that PC is dead now and back for repairs.

I'm stuck with windows 7 again and I was able to flash one CM3 but now I get the same problem over and over (can't detect the CM3)

My conclusion is this doesn't work on Windows 7.

We haven't had any trouble flashing from Ubuntu machines though, so I'm not sure why you're having trouble with that.

Re: CM3 Flashing on Windows 7 broken?

Posted: Thu Sep 07, 2017 7:18 am
by gsh
If it said XBox controller then you're using an old version of the installer

Use the latest version

Re: CM3 Flashing on Windows 7 broken?

Posted: Thu Jan 04, 2018 11:32 pm
by bioe007
I've just given up on the windows version.. It's just more reliable to use the another Pi or a proper linux box.

Re: CM3 Flashing on Windows 7 broken?

Posted: Sat Apr 28, 2018 10:23 am
by vijay.panchal
Hello,

I have the same issue with my system. I was working with another laptop with same OS. But not working in my system.

Re: CM3 Flashing on Windows 7 broken?

Posted: Sat Apr 28, 2018 12:45 pm
by gsh
Don't understand your system...

Can you describe what is going wrong?

Re: CM3 Flashing on Windows 7 broken?

Posted: Sat Apr 28, 2018 7:23 pm
by bioe007
In our experience, flashing from Windows is very spotty. Almost never works from Windows 7 machines and sporadically works from Windows 10.

When it does work from a Windows 10 laptop, then often it takes a shutdown/startup of the laptop to get it to work again.

This is (always) using whatever the latest rpiboot installer is linked from the CM3 flashing instructions page.

Re: CM3 Flashing on Windows 7 broken?

Posted: Mon Apr 30, 2018 3:48 am
by John Westlake
I beg to differ WRT flashing with Windows7, we have 4 different Windows7 machines in the lab (64bits) and all work well EVERYTIME... I've personally programmed atleast 500 boards :(

Re: CM3 Flashing on Windows 7 broken?

Posted: Mon Sep 24, 2018 9:49 pm
by hippy
bioe007 wrote:
Mon Apr 10, 2017 5:04 pm
"unable to install your BCM2710 Boot. Windows could not find driver software for your device ...
Late to the party here but had the same problem with Windows XP Pro SP3.

On Win 7 I get "Waiting for BCM2835/6/7" then it loads bootcode.bin, than back to "Waiting for BCM2835/6/7", and onwards.

On XP, after downloading the bootcode.bin it tries to install a BCM2710 driver and, as above, fails. The problem seems to be that it is "VID=0A5C/PID=2763/2708 Boot" at the first "Waiting", and that becomes "VID=0A5C/PID=2764/2710 Boot" at the second.

That would seem to be reflected in your own setupapi.app.log

I thought I had got it working and a driver installed by copying the entire usb_driver" directory to "usb_2710", editing the usb_device.inf within that to have a matching VID/PID with a new GUID, pointing Device Manager at that when it looked for a driver.

That got things past the second "Waiting", but unfortunately XP now won't recognise the Pi once it's been disconnected and then reconnected. And rpiboot now hangs if run a second time. I guess there's some conflict which needs resolving but at least the root cause of the problem, at least for me, seems to have been identified.

On Win 7 I'm guessing there's something which forces it to use PID=2763/2708 Boot drivers for 2764/2710 Boot but that doesn't happen with XP, or on your system.

Re: CM3 Flashing on Windows 7 broken?

Posted: Tue Sep 25, 2018 4:58 pm
by hippy
I believe I have solved my problems on XP and this may be of use for people having problems with Win 7.

Having dug around in the Foundation's usbboot/rpiboot repository it seems, according to install_script.nsi, there should be two drivers installed when running rpiboot_setup.exe, one for 2708 the other for 2710. Those are both created using wdi-simple.exe

Looking at the install log when installing -

Code: Select all

Installing BCM2708 driver...
Execute: "F:\Program Files\Raspberry Pi\redist\wdi-simple.exe" -n "Raspberry Pi USB boot" -v 0x0a5c -p 0x2763 -t 0
Driver install returned -7
Installing BCM2710 driver...
Execute: "F:\Program Files\Raspberry Pi\redist\wdi-simple.exe" -n "Raspberry Pi USB boot" -v 0x0a5c -p 0x2764 -t 0
Driver install returned -11
I don't know what the return codes should be but am guessing that 2710 did not install, seeing as it cannot be found later.

But manually executing the command after installing does seem to work -

Code: Select all

cd "\Program Files\Raspberry Pi\redist"
wdi-simple.exe -n "Raspberry Pi USB boot" -v 0x0a5c -p 0x2764 -t 0
Since that I now have rpiboot.exe running on XP as it does on Win 7, no prompting for that previously missing BCM2710 driver :D