FPGAwars / icestudio

:snowflake: Visual editor for open FPGA boards
https://icestudio.io
GNU General Public License v2.0
1.71k stars 246 forks source link

Icestudio: Board not connected #630

Closed MeindlD closed 7 months ago

MeindlD commented 2 years ago

Hi Community,

I'm new to the topic of FPGA and Icestudio seems to be a good starting point for me. So I purchased a iCE40 UltraPlus Breakout Board and downloaded Icestudio on my Windows 10 Client. I installed Icestudio, the toolchain and the drivers as described in the "Quick Start" - Documentation. But whenever I try to upload a file to the board I get the Message "Board iCE40 UltraPlus Breakout Board not connected". J6 is in the position "PROG ICE", J7, J51 and J28 are closed, J11 is open (refer to https://www.latticesemi.com/Products/DevelopmentBoardsAndKits/iCE40UltraPlusBreakoutBoard). I already changed the Notebook and tried a different breakout board, but the error message stays the same. I have no idea, what else I could try.

Greetings, Dominik

Obijuan commented 2 years ago

Hi Dominiki,

The iCE40 UP Breakout Board is fully supported in Icestudio. I have just re-tested it both in Linux and Windows and it works ok (I've tested using the latest wip release 0.9.2w202205241105 to make sure this is not a new bug)

I am not a Windows user, but will try to give you hint. First, let's check the board connection to your machine. It does not require Icestudio

  1. Check that the USB cable is a Data-usb cable (There are some usb cables that only have the power pins, but not the data pins). Make sure your cable has data pins. For doing that connect that board (or any other device) and check that Windows can communicate with it
  2. In the case of the ice40UP board you will see that appear two new COM ports. Open the usb device manager. You will see something like this (sorry, the windows I am using is in spanish):

imagen

If you unplug the board this COMs will dissapear. If you reconnect they will appear again

  1. Check the properties of the COMs. You should find the USB ID in any of the tabs (I've found it under event, but as I am not a windows user I really do not know how to check it properly) imagen

Please, check it and tell me the results before moving forward

Obijuan commented 2 years ago

Now that I've manage to get access to a windows machine, I will take some more screenshots. This screenshot correspond to the driver installation (Tools/drivers/Enable). If the usb cable is ok, and you have passed the previous checks, connect the board. You will find the device "Lattice ICE40UP5K Breakout (Interface 0)" (IT IS IMPORTANT TO BE THE Interface 0). Select the libusK and click on Replace driver:

imagen

It will take some time for windows to install the driver

After that you will see this window:

imagen

Close the window. Now unplug the board and plug it again

Obijuan commented 2 years ago

Now I can work normally with the board. For example, I've opened this example (from the iceBoard collection). It just turns red the RGB LED:

imagen

Make sure the board is pluged in the same USB port in which you installed the drivers. Now upload the design. After 30 seconds or so, you will see a green notification: Upload done. And the RGB board will now be red (I will send more screenshot later when I get back to my Linux machine)

imagen

Obijuan commented 2 years ago

This is the board with the previous circuit loaded (I've put some papers on the RGB led)

20220525_091337

In this picture you can see the configuration of my jumpers:

20220525_091414

Note The J6 should be in Flash position

But before all of this, check first your USB cable

MeindlD commented 2 years ago

Hey Obijuan, first of all: Thanks for the detailed instructions! So I removed the installed drivers and start again from the beginning to provide you the requested screenshots. When I plug in the board, the following devices appear: image

So it seems, that my cable is ok (I changed it anyway). The device ID is the same as yours (0403/6010). But when I try to install the driver, i experience a different behavior: My device is named USB<-> Serial converter Do i have to install any software from Lattice in advance? The USB ID and the driver versions are the same as yours. image

The driver installation succeeds: image

After plugging the Board out an in again, the following devices appear: image

When I now try to upload your example, i get the error message again: image

The configuration of the jumpers should be the same: image

Do you have any idea, how to proceed?

Thanks in advance, Dominik

Obijuan commented 2 years ago

ok, I see. As I am not a windows user/developer I really cannot help much. For whatever the reason your windows system cannot read the board information (it is not related to Icestudio, as Zadig (the driver installer) cannot see it either). So, the first step is trying to make Zadig see it

Maybe you could try to uninstall the USB serial converted A and try Zadig again. Does Zadig see it now? You should read "Lattice ICE40UP5K Breakout (interface 0) Also try to unplug all the USB devices you can, just in case there is a kind of "interference" between them (who knows, some installed driver that is bothering the others...) I will try it in Windows again and get more screenshots. I think I do not have the USB-Serial converter drivers... but I am not sure (Making drivers work in Windows is like magic. If you apply the correct spell it will work....)

Obijuan commented 2 years ago

This is the device manager once the driver has been correctly installed:

imagen

The initial COM3 deviced has moved into libusbK and it has been detected as a Lattice ICE40UP5K board. The other COM (COM4) remains untouched

I do not have any USB serial converted driver installed. Very likely this is the driver that is giving problems. Try to remove it

MeindlD commented 2 years ago

I tried to remove the driver in several ways now: First i uninstalled the device and activated the checkbox "Delete the driver software for this device". image

Second i manually deleted the driver files listed for this device: image

But when i disconnect the board and connect it again, the files appear and the driver is installed like it had never been deleted.

Additionally, i downloaded and installed the "Diamond Programmer" from Lattice with its drivers. Also no success. The same drivers as before are installed, when i plug in the board.

This drives me nuts...

TimRudy commented 2 years ago

Hi Meind,

I had the same issue (FPGAwars issue #234), and tried all kinds of software/driver and Zadig/install attempts, but it isn't a software issue, it is an issue where you need to give Windows a kick by using an actual new USB port or ID (that it assigns). I guess you already tried all the USB ports on your machine? Now, to put a new USB hardware ID in its USB hierarchy all you have to do is borrow a USB hub - bus-powered - for example a 1-to-4 hub. (Another example is I had a remote USB port on a monitor, and that worked.) With different hardware, you should get different result. Windows can need a bit of magic (or give you a bit of magic) like Obijuan said. Good luck! Tim

On Wed, May 25, 2022 at 7:26 AM MeindlD @.***> wrote:

I tried to remove the driver in several ways now: First i uninstalled the device and activated the checkbox "Delete the driver software for this device". [image: image] https://user-images.githubusercontent.com/106069445/170250671-b6964efd-9072-40a8-8494-2482aa6882fa.png

Second i manually deleted the driver files listed for this device: [image: image] https://user-images.githubusercontent.com/106069445/170251236-192257d6-e6c6-471f-80eb-67d2eba46682.png

But when i disconnect the board and connect it again, the files appear and the driver is installed like it had never been deleted.

Additionally, i downloaded and installed the "Diamond Programmer" from Lattice with its drivers. Also no success. The same drivers as before are installed, when i plug in the board.

This drives me nuts...

— Reply to this email directly, view it on GitHub https://github.com/FPGAwars/icestudio/issues/630#issuecomment-1137123166, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA6CTIX56GN4SITTYEBAT2LVLYE7TANCNFSM5WVF7RBA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

MeindlD commented 2 years ago

Hi Tim, thanks for joining the discussion 😂 It's good to hear, that I am not the only person in the world with this problem. According to what you proposed, i used the USB Hub in my monitor, aaaaaaaaaaaaand...

at least the error message changed 🤣 image

Do you know if this is a related issue or a different topic?

TimRudy commented 2 years ago

Different issue, getting APIO working. The Windows issue was
image or
image

Obijuan commented 2 years ago

These errors are also related to the drivers. Usually they show up when the driver is not installed (the software tries to open the device but it receives an error from the driver). The typicall action is to install the driver

After you get the error, can you click on the View/Command output and send an screenshot? I need to collect more information about it

(I assume that now Zadig worked ok and you already got the ICE40UP5K Breakout (Interface 0) Label)

MeindlD commented 2 years ago

Hi Tim and Obijuan,

thanks again for your support. Sorry for the late answer, but I didn't have access tot he hardware the past few days.

So this is my Command Output: image

In the device manager, my board is still named "USB <-> Serial Converter". But as I already wrote above: I have no idea, how i could get rid of this driver. Nevertheless the right driver for the board should have been installed, as it is listed as "libusbK USB devices" image

zambujal commented 1 year ago

don't know if it's the same thing... but I had some problems with the icestick lattice just changed the usb descriptor name...

The descriptor doesn't correspond (they changed it) so you have to change the boards.json (search for it in the users folder...) to the new usb descriptor for this to work. https://blog.j2i.net/2023/01/27/resolving-board-icestick-not-connected-for-the-lattice-icestick-hx1k-with-apio/ Apio as the same problem.

this works... I wonder why they changed the descriptor name... weird.

holography-be commented 1 year ago

Hello, I have the same problem with my icestick :-(

image

Where did you found the boards.json ? I'm looking on my all disk but not found it.

Thank you.

cavearr commented 7 months ago

The last wip (https://downloads.icestudio.io) contains the development toolchain with the latests yosys version that is more compatible with usb in windows (now you don't need zadig).

Try it and if you have problems reopen this.