Developer Guide

FPGA Development for Intel® oneAPI Toolkits with Visual Studio Code on Linux*

ID 767851
Date 12/16/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Set the Environment Variables and Launch the Visual Studio Code

Perform these steps to set the environment variables:
  1. Open a terminal session.
  2. Locate the setvars.sh script. The location depends of your oneAPI installation, and it will be one of the following:
    • If you installed as root or sudo, then find the script in the root directory of your oneAPI installation, which is typically /opt/intel/oneapi.
    • If you did not install as sudo or root, then find the script in the ~/intel/oneapi/ directory.
    • If you customized the installation folder, then find the script in your custom installation folder.
  3. Run the setvars.sh script from the command line using the following command:
    source <oneapi_install_path>/setvars.sh

    For more information, refer to Set Environment Variables for CLI Development.

  4. In the same terminal session, launch VS Code by running the following command:
    code
    NOTE:

    The benefit of sourcing the oneAPI setvars.sh script before launching VS Code is that all terminal sessions and child processes of VS Code includes the oneAPI development environment setup.