Using Visual Studio Code on macOS 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 & the remote ssh extension
- Go to the official Visual Studio Code website.
- Click on the Download button selecting the macOS operating system.
- Once the download is complete, run the installation file and follow the instructions.
Move the downloaded application to
/Applications
, for which you may need to type in the account name and password of an administrator on your computer. - Open Visual Studio Code and go to the Extensions tab (left sidebar).
- Search for Remote - SSH in the search bar and select the extension published by Microsoft.
- Click Install.
- Install the "C/C++ extension pack" from Microsoft.
- Install the "Makefile tools" from Microsoft.
Step 2: Add PYNQ to the remote ssh extension.
- Open the command palette in Visual Studio Code by pressing Command + Shift + p.
- Select Remote-SSH: Open SSH Configuration File...
- Select the config directory that ends in
.ssh/config
. - Add the following lines to the file (you can copy-paste these).
Note that the 4 spaces before
HostName
andUser
and the capital letters (e.g.HostName
notHostname
) are important. - 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.
- Connect the PYNQ board and switch it on. Wait until the DONE LED is on.
- Open the Remote Explorer on the left (the second icon from the bottom). Select pynq and click the little right arrow.
- When asked about the fingerprint press Continue. (This appears only the first time you log in.)
- 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. - The first time you log in Visual Studio Code takes some time to initialise itself. When you log in again, it is faster. The screen should look something like the picture below.
Step 4: Explore the files on the PYNQ board
Open the Explorer to see the files on the PYNQ board.
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'
.
As an example, we've opened the .bashrc
file.