Visual Studio Code (VS Code)
Microsoft has released a cross language cross platform code editor, vscode, with advanced features packaged into a command-based system (fewer menus, more commands). It has a C/C++ (instructions) module which supports Intellisense for easy code navigation and auto completion.
1. Install VS Code
Install VS Code on your native operating system (where your graphical output is). VS
- Install VS Code download
- Install extensions:
- C/C++ for editing and debugging C/C++ code
- Use Makefiles for compiling within VSCode blog, extension
- The Makefile has to be in the base folder to be detected by the plugin automatically. For projects with a Makefile in a subdirectory, configure your workspace with
makefile.makeDirectory
pointing to the subdirectory (e.g.src
) relative to the workspace base. - For cross compilation, use the preconfiguration and set
makefile.preConfigureSript
to the SDK environment setup script.
- The Makefile has to be in the base folder to be detected by the plugin automatically. For projects with a Makefile in a subdirectory, configure your workspace with
2. VS Code Remote Development
VS Code Remote Development simplifies remote development by accessing the remote file system, running remote compilations and executions. This is achieved by running a server portion of the editor on the remote machine (giving all access to files, compilers, executables) and a client portion of the editor locally. For more details see the Overview.
2.1 Windows - WSL as remote target
Since the development tools are installed in WSL you will need to use a WSL remote session instructions
2.2 SSH as remote target
For our work, you’ll need to use Remote SSH to connect to the COE machines. Make sure to connect to remote.coe.neu.edu (instead of gateway.coe.neu.edu). VS Code can leave some server processes dangling sometimes which is against the COE usage policy. To still allow for remote editing, we got our own server. There, you can also run the QEMU simulator.
3 Working as a group in the lab sessions
For joint editing and working on the same ZedBoard, we recommend VS Code Live Share.
- Install and configure extension Live Share for joint development through VS Code.
- For live share in Windows, create the first shared session natively in Windows. This triggers authentication through the web. After that, open a new WSL session with “File -> Open Folder in WSL …” to open any WSL directory. Once in the WSL session, will need to install the extensions again.
4 Other Extensions for VS Code
- VCD WaveTrace for viewing VCD traces