Open zapta opened 6 days ago
@zapta , i'm not a windows user, but with the newer oss cad suite , the ftdi lib has been updated and you need to use the native windows usb library (not replace with zadig and if you replace before, restore with zadig the original windows driver).
@cavearr, I tried to go back to the original ftdi drivers and program directly with iceprog
but it still doesn't work, details below. @Obijuan, any idea how to program Alhambra II on windows with the newer oss-cad-suite
packages?
Channel 0 has the FTDI driver:
Channel 1 has the FTDI driver:
Iceprog commands fail:
~/projects/apio_dev/repo/test-examples/Alhambra-II/02-jumping-LED$ apio build
Setting the envinronment.
[Wed Nov 13 07:48:35 2024] Processing alhambra-ii
-------------------------------------------------------------------------------------------------------------------------------------
yosys -p "synth_ice40 -top main -json hardware.json" -q main.v
Warning: wire '\q' is assigned in a block at main.v:3171.14-3171.21.
Warning: wire '\q' is assigned in a block at main.v:3175.6-3175.12.
nextpnr-ice40 --hx8k --package tq144:4k --json hardware.json --asc hardware.asc --report hardware.pnr --pcf main.pcf -q
icepack hardware.asc hardware.bin
==================================================== [SUCCESS] Took 6.61 seconds ====================================================
~/projects/apio_dev/repo/test-examples/Alhambra-II/02-jumping-LED$ apio raw "iceprog -d i:0x0403:0x6010:0 hardware.bin"
Setting the envinronment.
init..
Can't find iCE FTDI USB device (device string i:0x0403:0x6010:0).
ABORT.
~/projects/apio_dev/repo/test-examples/Alhambra-II/02-jumping-LED$ apio raw "iceprog hardware.bin"
Setting the envinronment.
init..
Can't find iCE FTDI USB device (vendor_id 0x0403, device_id 0x6010 or 0x6014).
ABORT.
~/projects/apio_dev/repo/test-examples/Alhambra-II/02-jumping-LED$ apio system --lsusb
Setting the envinronment.
2109:0817 (bus 2, device 4) path: 8.3
1022:15e1 (bus 1, device 0)
046d:c52f (bus 2, device 7) path: 4.3.3
1022:15e0 (bus 2, device 0)
1038:1618 (bus 2, device 8) path: 4.3.2
0b0e:0305 (bus 2, device 6) path: 4.4
2109:2817 (bus 2, device 3) path: 4
2109:0817 (bus 2, device 1) path: 8
8087:0a2a (bus 1, device 1) path: 2
0403:6010 (bus 2, device 2) path: 2
2109:2817 (bus 2, device 5) path: 4.3
~/projects/apio_dev/repo/test-examples/Alhambra-II/02-jumping-LED$
Hi @zapta yesterday i'll try with a friend and this works in his windows. I'll try to reproduce and send you and screenshot.
@cavearr, It's working now. The driver to use is WinUSB. This driver still needs zadig settings, right? If I uninstall the driver, next time Windows assigns the FTDIBUS driver, so I presume WinUSB is not the default driver.
Yes that is! i'm forget tell you that you need to plug and unplug usb after reinstall the driver, sorry!
For people that is the first time Icestudio installation, don't need to install any driver with zadig, i'm removing this step from icestudio, all works with windows native driver.
Carlos,
What driver do you see in zadig when you install alhambra II on a fresh windows system?
Do we still need apio drivers --enable-ftdi
and apio drivers --disable-ftd
on windows? If so, how their instruction text should be changed, just replace 'libusb' with 'winusb' ?
In a fresh windows os you don't need to install any driver. works natively. I don't try on winows this two commands, if you give me until tomorrow afternoon , in the morning i could test in a fresh windows computer and tell you the result of this tests.
Tell me what commands do you need to try and in ther morning i'll do it.
Hi @cavearr, please try this and post here how it went.
Prerequisites:
Open Alhambra II in zadig and let me know what drivers are listed for interface 0 and for interface 1.
Decide if the command apio drivers --ftdi-enable
is still needed for windows. If the answer is no, do nothing and I will remove it for windows. If the answer is yes, run it and tell me how the instruction text should be changed.
Try to upload a project to Alhambra and see if it works. apio upload
.
Decide if the command apio drivers --ftdi-disable
is still needed for windows. If the answer is no, do nothing and I will remove it for windows. If the answer is yes, run it and tell me how the instruction text should be changed.
The goal is to make the windows driver issue as painless as possible to users, especially less experienced ones.
NOTE: I was able to reproduce this problem with upstream oss-cad-suite packages from YosysHQ , such that this is not apio specific.
On my windows box 'apio upload' fails with the apio dev version but not with apio prod version. The failure is in the iceprog.exe stage which exits with the following error.
The problem seems to be in the oss-cad-suite packages and was reproduced independently also without apio. This one which is also used for the apio prod version works https://github.com/YosysHQ/oss-cad-suite-build/releases/download/2023-10-03/oss-cad-suite-windows-x64-20231003.exe but newer versions don't. The upstream package seems to have different versions of iceprog.exe in different versions. Below is a python script I used to hash the files.
I am using AMD/Ryzen, Windows 10, Alhambra II.