Set up the Torizon IDE Extension 2 Environment
Introduction
This article provides a step-by-step guide on host machine setup for developing applications with TorizonCore devices using Visual Studio Code and the Torizon VS Code Extension 2. It includes instructions for Installing software and dependencies on your Windows or Linux-based host machine.
This article complies with the Typographic Conventions for Toradex Documentation.
Prerequisites
- Understanding the basics of the Torizon IDE Extension 2.
- Host machine with an officially supported Linux distribution installed.
- Host machine with Visual Studio Code installed.
You have to install the Visual Studio Code from its Download page. The IDE Extension 2 will not work with VS Code installed via Snap or Flatpak!
For WSL 2, Visual Studio Code has to be installed on the Windows side.
Configure a Windows Host Machine
Install WSL 2
The Windows Subsystem for Linux (WSL) enables the use of most Linux command-line tools, utilities and applications directly on Windows. It also lets you leverage the IDE Extension 2 with Visual Studio Code installed on your Windows machine.
Install Linux on Windows with WSL. Remember to change the default Linux distribution installed. Choose one of the Torizon IDE 2 officially supported Linux distributions.
Check which version of WSL you are running. If WSL 1 is installed, upgrade version from WSL 1 to WSL 2.
Install Docker Engine
Since Docker Desktop is licensed under the Docker Subscription Service Agreement, we recommend using Docker Engine.
Install Docker Engine: The release of Docker provided by some distribution feeds is not up to date. To ensure the correct Docker installation, follow the instructions for your distribution in the Docker documentation.
Install the WSL Extension
To use WSL in Visual Studio Code, install the WSL extension:
The WSL extension lets you use VS Code on Windows to build Linux applications that run on the Windows Subsystem for Linux (WSL). You get all the productivity of Windows while developing with Linux-based tools, runtimes, and utilities.
Set up the Torizon IDE Extension 2 on Visual Studio Code
Uninstall previous versions: it is not recommended to have both IDE Extensions 1 and 2 installed in your VS Code installation at the same time. If you have the V1 extension installed, please uninstall it before proceeding with the next steps.
Connect to the WSL environment: press
F1
, search forwsl
, and selectWSL:Connect to WSL
. By now, you can install extensions in the WSL environment.Install & Configure the IDE Extension 2.
Click the
Extensions
icon from the left menu bar in Visual Studio Code.Search for
Torizon IDE Extension
. Clickinstall
.Activate the extension: the Torizon icon will appear in the left menu bar. Click on it to activate the extension.
Installing dependencies: during the first activation, the extension will check the necessary dependencies. If any missing dependencies are detected, the extension will attempt to install them and prompt you to enter your
sudo
user password.Accept the package installation.
Install PowerShell: another terminal will open and try to install PowerShell. Enter your
sudo
user password.
Configure a Linux Host Machine
Install Docker Engine
Since Docker Desktop is licensed under the Docker Subscription Service Agreement, we recommend using Docker Engine.
Install Docker Engine: The release of Docker provided by some distribution feeds is not up to date. To ensure the correct Docker installation, follow the instructions for your distribution in the Docker documentation.
Set up the Torizon IDE Extension 2 on Visual Studio Code
Uninstall previous versions: it is not recommended to have both IDE Extensions 1 and 2 installed in your VS Code simultaneously. If you have the V1 extension installed, please uninstall it before proceeding with the next steps.
Install & Configure the IDE Extension 2.
Click the
Extensions
icon from the left menu bar in Visual Studio Code.Search for
Torizon IDE Extension
. Clickinstall
.Activate the extension: the Torizon icon will appear in the left menu bar. Click on it to activate the extension.
Installing dependencies: during the first activation, the extension will check the necessary dependencies. If any missing dependencies are detected, the extension will attempt to install them and prompt you to enter your
sudo
user password.Accept the package installation.
Install PowerShell: another terminal will open and try to install PowerShell. Enter your
sudo
user password.