Skip to content

Debugging using the serial port

The serial connection is primarily used for debugging and should not be used for normal use of the PYNQ board. It's slower than the Ethernet connection, and your computer also cannot share its (inter)network connection with the PYNQ board.

Before starting, you should have configured the PYNQ board. First, connect your laptop to the PYNQ board and boot the PYNQ.

Using MobaXterm on Windows

  1. Install MobaXterm if you haven't done so.
  2. Open MobaXterm.
  3. In the top left, press the Session button. Session Button
  4. Press the Serial button at the top of the window that has just popped up. Serial Button
  5. Set the BAUD for the connection to 115200 and select the USB serial port where your PYNQ is connected. Serial Settings
  6. Click the OK button on the bottom of the window. Now a window as shown below should pop-up.
    Empty Moba Window
  7. If the window is empty, press enter a couple times. Your terminal should now look the same as shown below.
    Full window bottom

When using MobaXterm for troubleshooting your installation, this terminal should give useful information in the specific errors the board is throwing or can be used to indicate if the board is even booting properly in the first place.

⚠️ Warning
Also when using the serial port, make sure you always power down the board with sudo halt!

Using screen on macOS and Linux

This method assumes that you are using the terminal.

On macOS use the screen /dev/tty.usbserial-1234_tul1 115200 command. Press return a few times to get to the PYNQ login prompt. It's not the nicest interface to use and should only be used for debugging.

tio offers a better interface, but it's not pre-installed on macOS. You can install it using the Brew package manager, with brew install tio. Then use the tio /dev/tty.usbserial-1234_tul1 -b 115200 command.

Under Linux both screen and tio are available and can be installed. You can install tio or screen on Debian based distributions using sudo apt install tio screen. The serial port device path is normally: /dev/serial/by-id/usb-Xilinx_TUL_1234-tul-if01-port0. To connect, with tio, use the tio /dev/serial/by-id/usb-Xilinx_TUL_1234-tul-if01-port0 -b 115200 command.

Multiple PYNQ boards

If you connect multiple PYNQ boards to your laptop then you may have to try the different serial ports to connect to both of them at the same time with MobaXterm, tio, or screen. It is possible but not recommended to use ssh to log in to one PYNQ board and tio/screen for the other board, but ssh may pick either board (i.e. the one you have logged into with tio already, or the other one) which can be confusing. (On macOS the second PYNQ board will usually connect to /dev/tty.usbserial-4.)

Shutdown

⚠️ Warning
Also when using the serial port, make sure you always power down the board with sudo halt!