Go Board – Setting Up APIO, open source FPGA build and program tools
This page details the steps to get set up with APIO, an all inclusive open source toolchain for building and programming your FPGA. It works on Windows, Linux, and Mac operating systems. It’s easy to get setup and works great with the Go Board. One note though, ONLY VERILOG IS SUPPORTED. Sorry VHDL users, you’re going to have to use iCEcube2 to program your board.
Instructions
- Download Python if you don’t already have it. Any version 3.9 or up will work. Run the file.
- Make sure that Add Python 3.X to PATH is checked and then click Install Now as shown below.
- Open Command Prompt as an Administrator (Click Run as Administrator). On MAC use Terminal.
- Install apio using:
python -m pip install apio
- Install all packages using:
apio install -a
- Plug in the Go Board to your computer
- Enable drivers using:
apio drivers --ftdi-enable
- WINDOWS ONLY: On this screen, Select
Dual RS232-HS (Interface 0)
from the large dropdown, andlibusbK
from the Driver dropdown as shown in the image below. You may have to Click Options -> List All Devices to get this to appear. - WINDOWS ONLY Click Replace Driver button.
- WINDOWS ONLY Wait a couple minutes, this process can take some time, be patient.
- WINDOWS ONLY Once it’s done you’ll see “The driver was installed successfully.” You can click Close out of this window.
- WINDOWS ONLY Close out of the Zadig application.
- Unplug and plug in the Go Board again. You’re ready!
- Change into a directory you would like to work in. We will now test the Go Board can be programmed successfully.
- Set up the Blinky example using:
apio examples -d go-board/Blinky
- Change into this directory using:
cd go-board/Blinky/
- Build the Verilog code and upload it to the Go Board using:
apio upload
See the LED1 blinking!
Troubleshooting
Issue: When I try to run apio commands I get an error
Make sure your Scripts directory is on your Environment variable path. Search Google for how to add Python Scripts directory to your Path.
Issue: I get an error when calling apio upload: “ftdi_usb_get_strings failed: -4 (libusb_open() failed) Error: Error executing lsftdi”
This is caused when you have another USB Serial Device plugged in to your computer that also uses an FTDI port. Unplug all other USB devices except the Go Board and try calling apio upload
again.
Issue: I want to revert back to the old driver (FTDIUSB)
- Open Device Manager in Windows.
- Find “libusbK USB Devices”, expand it.
- Right-click on Dual RS232-HS (Interface 0) and click Properties
- On the new window that opens, select the Driver tab.
- Click “Uninstall Device” as shown in the image below.
- Select the “Attempt to remove the driver for this device” checkbox. Click Uninstall.
- Unplug and plug in the Go Board.
- You may need to repeat this process if the driver is not reverted. This can happen if multiple versions of the libusbK driver (or other drivers) are found on your system. Eventually you will remove them all and revert to the default Windows driver.
when I try to install the drivers this comes out:
C:\WINDOWS\system32>apio drivers –ftdi-enable
Launch drivers configuration tool
FTDI driver installation:
Usage instructions
1. Connect the FTDI FPGA board
2. Select (Interface 0)
3. Replace driver by “libusbK”
4. Reconnect the board
5. Check `apio system –lsftdi`
Error: [WinError 193] %1 is not a valid Win32 application
Trying to execute zadig.exe in command line, but an error ocurred
Please, execute the command again in the command line with administrator privilegdes
Did you make sure you were running the Command Prompt as an Administrator?