So you have a ULX3S and want to connect via SSH. Yes! This is quite easy to do with open source software.

The ULX3S is cool not only for being an impressively designed FPGA board with plenty of onboard peripherals, but also because one of the “peripherals” is an ESP32! See also the ESP32 SSH Server project.

I first heard about Radiona back in 2019. In fact, I have several blogs about the ULX3S.

This isn’t your typical ESP32 though. It sits behind the FPGA. To use it, the FPGA needs to be configured. I have a quick start that does just that. I have a precompiled binary FPGA image for the 12F, or there are other specific versions available depending on the ECP5 size. The only other thing needed is an app such as fujprog. There are other releases available for download if you don’t want to bake your own cake.

Reminder we can call an Windows executable from WSL:

wget https://github.com/kost/fujprog/releases/download/v4.8/fujprog-v48-win64.exe
wget https://github.com/emard/ulx3s-bin/raw/master/fpga/passthru/passthru-v20-85f/ulx3s_85f_passthru.bit
./fujprog-v48-win64.exe ulx3s_85f_passthru.bit

Upon successful program this is a typical output:

0 $  ./fujprog-v48-win64.exe ulx3s_85f_passthru.bit
ULX2S / ULX3S JTAG programmer v4.8 (git 96ebb45 built Oct  7 2020 22:42:00)
Copyright (C) Marko Zec, EMARD, gojimmypi, kost and contributors
Using USB cable: ULX3S FPGA 12K v3.0.3
Programming: 100%
Completed in 10.97 seconds.

Once the FPGA has been configured with the passthru code, the ESP32 can be accessed as if it were connected directly to the USB port.

I’m using the VisualGDB extension for Visual Studio, so I needed to change the Program FLASH Using setting to esptool.py (via COM port).

VisualGDB_flash_programming.png

Next, I have the wolfSSL ESP32 SSH Server project in the works.

Just compile and upload. Connect to the ULX3S COM port to see diagnostic messages (don’t forget to close putty when programming!).

The ESP-IDF also of course works (VisualGDB is a nice front end, but still used ESP-IDF). In my case, the ULX3S is on COM19

idf.py flash -p COM19

Programming from the ESP-IDF should looks something like this:

wolfssh_esp-idf_flash.png

Upon success, the diagnostic messages will be output to the COM port, and the SSH server can be accessed from anywhere on your network:

ulx3s_ssh_server.png

Login from WSL. The default password for jill is upthehill:

ssh jill@192.168.1.100 -p 22222

SSH to UART

I next need to see which ESP32 GPIO pins are immediately accessible on the ULX3S. The the SSH server on the ULX3S will be able to connect to a UART via wolfSSH.


Troubleshooting

When uploading FPGA binary files, the FTDI drivers should make the device appear as a COM port in Windows. If there’s an error Cannot find JTAG cable: Make sure to use the USB cable connected to the FTDI (the connector opposite the SD card) and USING THE FTDI Drivers, available for download from ftdichip.

ULX2S / ULX3S JTAG programmer v4.8 (git 96ebb45 built Oct  7 2020 22:42:00)
Copyright (C) Marko Zec, EMARD, gojimmypi, kost and contributors
FT_Open() failed
Cannot find JTAG cable.

This is what Zadig looks like with a happy ULX3S ready for FPGA bitstream upload:

ulx3s_ftdi.png

OpenOCD

Reminder to instead use OpenOCD with the ULX3S, the libusbK drivers are needed:

Zadig is your friend. See also details for ICE40 and Programming FPGA Devices from WSL.

Just replace the default drivers with libusbK:

ulx3s_zadig.png

Windows users make sure the ULX3S is listed under the libusbK USB Devices in Device Manager:

ulx3s_libusbK