Skip to content

Using Visual Studio Code on Windows to log in to a PYNQ board

You need to install Visual Studio code (Steps 1-2) only once. Every time you use the board you need to log in to it (Steps 3-4).

Step 1: Install Visual Studio Code & extensions

  1. Go to the official Visual Studio Code website.
  2. Click on the Download button selecting the Windows operating system.
  3. Once the download is complete, run the installation file and follow the instructions.

  4. Open Visual Studio Code and go to the Extensions tab (left sidebar).
    Visual Studio Code Extensions Tab

  5. Search for Remote - SSH in the search bar and select the extension published by Microsoft. Visual Studio Code SSH Plugin
  6. Click Install.
  7. Install the "C/C++ extension pack" from Microsoft.
    C extension
  8. Install the "Makefile tools" from Microsoft.
    C extension

Step 2: Add PYNQ to the remote ssh extension.

  1. Open the command palette in Visual Studio Code by either pressing F1 or by typing Ctrl + Shift + p.
  2. Select Remote-SSH: Open SSH Configuration File... Configure Remote SSH
  3. Select the config directory that ends in \.ssh\config. Select Config File
  4. Add the following lines to the file (you can copy-paste these). Note that the 4 spaces before HostName and User and the capital letters (e.g. HostName not Hostname) are important.
    Host pynq
        HostName 10.43.0.1
        User student 
    
  5. Save and close the file.

Step 3: Log in to the PYNQ board

With the configured ssh file, a connection between your laptop and the PYNQ board can be established.

  1. Connect the PYNQ board and switch it on. Wait until the DONE LED is on.
  2. Open the command palette in Visual Studio Code by either pressing F1 or by typing Ctrl + Shift + p.
  3. Select Remote-SSH: Connect to Host (this is also called "logging in").
    Connect To Host
  4. Select the pynq profile:
    Connect To PYNQ
  5. Select Linux
  6. When asked about the fingerprint press Continue. (This appears only the first time you log in.)
  7. When prompted for the password (in the top middle of the screen - it's not very prominent), enter: student. It may take some time before the screen is updated.
  8. The first time you log in Visual Studio Code takes some time to initialise itself. When you log in again, it is much faster.

Step 4: Explore the files on the PYNQ board

Open the Explorer to see the files on the PYNQ board. File Explorer

The first time you log in, you'll get a pop-up asking to trust the authors of the files. Also select the Trust the authors of all files in the parent directory 'home'.
Trust authors

As an example, we've opened the .bashrc file. bashrc

Step 5: Write and run an application