Hello, Guest the thread was called230 times and contains 7 replays

last post from Snoopy at the

Connecting the Nexys A7 board with a serial terminal on Linux PC?

  • I have bought the Nexys A7 100T board a few months ago because I wanted to use the MEGA65 bitstream. :rolleyes:


    Yesterday I thought of "playing" something with the board apart from the MEGA65. I searched through the net and find some articles about the board.


    Sadly I fail in a very first step to play with the board. As described in a README, I should connect the board with a serial terminal on the PC:

    Quote

    Attach the USB cable to your desktop computer, so that you can setup a serial (terminal) connection between the desktop and the FPGA.


    Open a serial terminal program, configure it as 115.200 baud, 8-N-1, CTS ON, attach the FPGA, turn it on, after the bitstream loaded from the SD card, connect the terminal program to the serial interface of the FPGA and press the reset button.

    I read these texts from Digilent:


    https://reference.digilentinc.…logic/tutorials/tera-term


    https://reference.digilentinc.…als/tera-term/using/linux


    and installed "Putty" an my "Linux Lite 4.8" (a Ubuntu variant) PC.


    But I still don't know how I have to set putty to get connected with the Nexys board. ?(


    The "lsusb" command shows me this:

    I'm a very newbie on this FPGA stuff. :baby2:


    Does anyone have an idea what I overlook? :/

  • Hi Snoopy,


    even if i don't use Linux myself, the principle should be the same.


    With putty it's quite easy to establish a serial connection.

    you need to find out what serial connection you're using (what USB port your Nexys is connected to), by using


    Code
    1. $ dmesg | grep tty


    The response should be something like this:

    Code
    1. [ 37.531286] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
    2. [ 37.531841] 00:0b: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
    3. [ 37.532138] 0000:04:00.3: ttyS1 at I/O 0x1020 (irq = 18) is a 16550A


    Then choose in putty connection type "serial" (right side of the window, upper part) and you should be able to set the connection to serial and set your Serial port (COM port)

    Next select on the left hand side bar the -serial menu and put in your settings.

    (configure it as 115.200 baud, 8-N-1, CTS ON)

    When done, go back up to session, give your Session a name and save it (for later use) and click Open.


    Now a Terminal window should open and your serial connection should be established.

  • Thanks for your help! :thumbup:


    dmesg | grep tty shows me:

    Code
    1. [ 0.000000] console [tty0] enabled
    2. [ 1.251383] 0000:00:16.3: ttyS4 at I/O 0x30b0 (irq = 19, base_baud = 115200) is a 16550A
    3. [ 5.370380] usb 3-3.3: FTDI USB Serial Device converter now attached to ttyUSB0
    4. [ 5.370572] usb 3-3.3: FTDI USB Serial Device converter now attached to ttyUSB1


    I set putty as shown here:




    After "Open" the connection I get this error:



    ?(

  • i would say its either ttyUSB0 or ttyUSB1. it's a FTDI device, so one connection is for jtag the other for serial.

    One of them should work.

    (And remember to save your session ;-) )

  • According to the dmesg, it should be ttyUSB0 or 1. However you may have no rights to access that device as a regular user, and that's why saying unable to open serial port. First, you should check the device nodes in question with a command like: ls -la /dev/ttyUSB* so you can see what group is assigned, and your user (you use your Linux OS with) should be in that group to be able to access that device (so you should add your user to that group). Other possibility is to run putty as root user, but that's considered a dangerous thing in the UNIX world in general, unlike Windows, when people run insane stuffs as administrator user and then wondering having trojans, viruses and other stuff around ...


    Btw usually these serial devices are in the "dialout" group, however that's not always (depend on the actual distribution you're using). In case of eg Ubuntu, a command like this:


    sudo adduser YOUR_USER dialout


    Will add "YOUR_USER" (replace with your user name) to the dialout group (but again, check with ls, what group is refereed).

  • Btw usually these serial devices are in the "dialout" group, however that's not always (depend on the actual distribution you're using). In case of eg Ubuntu, a command like this:


    sudo adduser YOUR_USER dialout


    Will add "YOUR_USER" (replace with your user name) to the dialout group (but again, check with ls, what group is refereed).

    Perfect! Many thanks! That was the problem. :thumbup:


    Now I can access the Nexys board with ttyUSB1. :)