Today I received a DM on Twitter asking for help to program an FPGA (specifically the 1bitsquared iCEBreaker) from WSL . I realized that most of the useful information is buried in my long (and admittedly sometimes rambling) prior blogs. So this is a summary for just that topic.

The first thing to do, is plug in your device. In the case of the iCEBreaker, make sure the drivers are set to libusbk using Zadig as noted here :


Note that native USB drivers are not supported in WSL (well, WSL1, anyhow; I've not been able to install WSL2 just yet)
If after changing the drivers the board is *still* not recognized by iceprog, try unplugging, waiting a few seconds and plugging the iCEBreaker back into the USB port. I've also seen mixed results with hubs, so perhaps try connecting directly if it still does not work.

Next, make sure you have the DOS version of the programmer on the Windows filesystem. I have mine in my C:\workspace\ulx3s-toolchain\bin\ directory:



The really crazy thing about WSL, is that not only is the Windows file system available in the /mnt/ directory such as /mnt/c for c:\ ... but Windows executables can be launched from the WSL prompt as well! And of course there's plenty of native USB driver support in Windows.

Here's an example in /mnt/c/users/gojimmypi/source/repos/Verilog12/Verilog12 - a WSL directory which is C:\users\gojimmypi\source\repos\Verilog12\Verilog12  (created by Visual Studio)

Calling the DOS executable to program the iCEBreaker:


That's it!

Links:




Copyright (c) gojimmypi all rights reserved. Blogger Image Move Cleaned: 5/3/2021 1:35:54 PM