im-tomu / fomu-hardware

Tomu FPGA (Fomu for short), a FPGA which fits inside your USB port!
Creative Commons Attribution Share Alike 4.0 International
211 stars 22 forks source link

Kosagi FOMU pvt board acess by `/dev/tty` #25

Closed FelipeWcosta closed 1 year ago

FelipeWcosta commented 1 year ago

Hello everyone!

I am working with litex/CFU-Playground tools and to flash a CPU like Vexriscv I need to acess the board by /dev/ttyUSB0, /dev/ttyUSB1 or /dev/ttyACM0 if possible.

When I run lsusb I can see that device is connected:

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 1209:5bf0 Generic Fomu PVT running DFU Bootloader v2.0.4
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

But do not exist none file like /dev/ttyUSB0 or /dev/ttyUSB1 then a tryed to do something like this to have acess adding the rule at /etc/udev/rules.d/99-kosagi-fomu-pvt.rules:

SUBSYSTEM=="tty", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="5bf0", MODE="0664", SYMLINK+="ttyUSB0"

But still does not worked, I am using Ubuntu-22.04 by WSL 2.

xobs commented 1 year ago

The cpu, by default doesn't expose a serial port. It only does DFU, so you will need to upload some temporary firmware to get the functionality you need.

Wishbone-tool knows how to speak a special protocol that allows you to debug the device, though I'm not sure if it will work via wsl2. You might need to run wishbone-tool under Windows instead.

FelipeWcosta commented 1 year ago

I made a setup for a wishbone-tool, I even can flash some values at memory to controller the RGB led, like you can see, but no more than this. Maybe, make Ubuntu my main OS will be more sense.

wish_test