Page 2 of 2

Re: Firmware development in Windows

Posted: Mon Jul 29, 2019 10:32 pm
by matejkarasek
Hi,
Yes, am running cfloader natively under Windows, and use the libusb-win32 (v1.2.6.0) driver...
But, I finally succeeded to flash! :D The issue seems to be related to my USB.

I only have a single USB port (Surface Pro 4) so I use a USB hub. Apparently, it does not work through the USB hub (at least natively under Windows)... If I connect the crazyradio *directly to the USB port*, then the first time it also fails (with the same error message as I posted earlier), but if I try immediately for the second time, it then starts and succeeds. BTW, I observe the same behavior when trying to flash from the Crazyflie PC client, the first time it gives an error, the second time is ok.

Interestingly, just the datalink works fine through the USB hub. Although, sometimes (quite often actually, am running at 2M as recommended with the LPS deck) the connection breaks due to "Too many packets lost".

And, even more interestingly, when running things from the VM, the flashing works fine *through the USB hub*, directly on the first attempt...

So while I now have a working workflow (thanks a lot theseankelly!!!), it is still a bit puzzling, and also a bit annoying as I have to disconnect the hub everytime I want to flash.
Why would the Crazyradio performance be worse in Windows than in the VM (running on the same machine on the same Windows intallation...)? Driver issue? Or USB port settings?

One thing I have noticed: while in the VM the radio device stays connected all the time, in Windows when I start flashing via cfloader (or via the PC client), I hear the sound of disconnecting and connecting USB device in Windows...

Re: Firmware development in Windows

Posted: Tue Aug 06, 2019 9:32 pm
by matejkarasek
Just a small update, following these instructions I was able to get it working also on a second PC with clean Windows 10 (ver 1903).
The USB driver issue is not present here.

@kimberly I can help to update the corresponding wiki page, should that be helpful...

Re: Firmware development in Windows

Posted: Wed Aug 07, 2019 7:56 am
by kimberly
Hi Matej,

Yes! that will be great. We are currently busy of migrating the wiki pages to markdown pages in the repositories. @thesankelly also wanted to contribute to an tutorial as well, but it might be better to wait until we got the move more finalized. You can start making markdown pages of the instructions in the mean time and once I give the heads up you can make a pull request to the designated repositories?

But maybe best to discuss the right strategy in this thread for the documentation :) viewtopic.php?f=2&t=3596