Search by Tags

Torizon Application Development With Visual Studio Code

 

Article updated at 26 Jul 2021
Subscribe for this article updates

Introduction

Visual Studio Code is a text editor that can be enhanced with extensions to become your custom development environment. Toradex provides the Visual Studio Code Extension for Torizon to make your development life easier.

Resources

Browse for VS Code on Torizon resources from the tabs below.

Requirements

Everything you need is a Computer on Module with Torizon installed and a desktop PC for development. If using Windows, you must have the Windows Subsystem for Linux 2 (WSL2) installed and configured.

How to Start

Following our Step-by-step Quickstart Guide for fully supported modules is the easiest way to get you set up in no time.

Alternatively, you can follow the instructions below if you prefer a summarized version. This is only recommended if you have some knowledge of Torizon and VS Code, especially how to use the VS Code command palette.

Installation

The latest versions of the Toradex Torizon Support extension can be found on the Visual Studio Code marketplace, in two versions:

Click on the Extensions button in Visual Studio Code as shown in the image below and search for Toradex Torizon Support, then select the option you prefer among the ones presented above:


  • Toradex Torizon Support Extension for Visual Studio Code

    Toradex Torizon Support Extension for Visual Studio Code

Verify that the extension has been enabled:


  • Torizon extension

    Torizon extension

Add a Target Device

Add a target device from either the network or the serial port. In the VS Code command palette, use either of the commands:

  • Network: Torizon: Detect device via network connection
  • Serial Port: Torizon: Detect device via serial port connection

Alternatively, from the VS Code graphical interface:

  • Adding a Torizon Device

The board will reboot once you add it.

Create an Application From a Template

In the VS Code command palette, type torizon create. You will be presented with some options, from which you can choose the programming language you want to work with:


  • Creating a Torizon Application

    Creating a Torizon Application

You will be prompted with a series of questions to configure your project. See below an example for C/C++, but keep in mind that options vary depending on the programming language:

  • Creating a Torizon C/C++ Project on VS Code

Note: this operation may take some time, especially if you create a new C/C++ project. This is due to the download of the SDK.

Deploy and Debug

To start the process, all you have to do is press F5. Alternatively, you can select the menu Run and click on Start Debugging. A third method would be to open the command palette and type Debug: Start Debugging.

Additional Resources

Proceed to the Documentation tab on this page.

VS Code on Torizon Documentation

An overview of relevant articles is presented in this tab. You can scroll through contents or click on your topic of interest below:

We use icons to help you identify the content in an article:

Visual Studio Visual Studio Code Command Line Conceptual Starting Point Docker Concepts Torizon Samples on Github

First Steps

Article Brief Description
Quickstart Guide A step-by-step guide, with sections and lessons, for you to start with Toradex modules
TorizonCore Technical Overview A plentiful overview of TorizonCore and its features
Basic Linux Commands If you are new to Linux, learn some basic Linux commands to help you get started
Scan your local network to find the board IP and MAC address How to scan you local network and find your board's IP
SSH Access the Linux console (terminal) through the network and configure passwordless access
Configuring Serial Port Debug Console (Linux/U-Boot) Alternative to SSH, access the Linux console through the debug UART

Essentials

Article Brief Description
Toradex Download Links (Torizon, Linux BSP, WinCE and Partner Demos) Download TorizonCore tarballs for offline installation or customization with TorizonCore Builder
Deploying Container Images to TorizonCore Learn how to deploy your application on different phases of the development
Run and Manage Containers with Portainer and the Command-line on Torizon How to run and manage containers using Portainer, a container manager, and the command-line
How to Autorun an Application With TorizonCore Learn how to automatically start a container on the boot of Torizon
Torizon Best Practices Guide Learn the best practices to develop on Torizon, including data storage, hardware access and more
Toradex Embedded Linux Support Strategy Read more about the software versioning scheme adopted by Toradex, the Linux release types and also software alerts
Torizon Frequently Asked Questions (FAQ) Frequently Asked Questions (FAQ) about Torizon and TorizonCore

Application Development

Article Brief Description
Configure Build Environment for Torizon Containers Prepare your host machine to cross-build ARM containers
How to speed-up docker containers builds on Linux Learn tips and tricks to build containers fast
How to do C/C++ Development on Torizon Conceptual article with examples on how to develop your own app targeting Debian-based containers
Python development on TorizonCore Overview article about how to do Python development on TorizonCore
Using Multiple Containers with TorizonCore How to orchestrate multiple containers and manage the inter-communication process

Application Development With VS Code

Article Brief Description
Torizon Application Development With Visual Studio Code A cover page with info on how to quickly setup VS Code and a list with related documents
Visual Studio Code Extension for Torizon Learn how to install, configure and use the VS Extension on Torizon
How to Update an Existing VS Code Project to a Newer Debian Container Version How to upgrade your VS Code Project Container from Buster to Bullseye
.NET Core Development and Debugging on Torizon Using Visual Studio Code Setup a .NET Core development environment for Visual Studio Code
Python Development and Debugging on Torizon Using Visual Studio Code Setup a Python development environment for Visual Studio Code
C/C++ Development and Debugging on TorizonCore Using Visual Studio Code How to run and debug C/C++ Applications on TorizonCore using the Visual Studio Code
Qt C++ application development using Visual Studio Code and Torizon Learn how to integrate Qt Design Studio with Visual Studio Code
How to Import a C/C++ Application to Torizon Conceptual article with examples on how to import a C/C++ application to Torizon using Visual Studio Code
Torizon IDE Backend Architecture and Internals Moses is the open-source Torizon IDE backend. You can add support to your preferred IDE, script the release of software, and more

Toradex Containers

Article Brief Description
List of Container Images for Torizon A brief overview with a list of containers and links to additional resources
Debian Containers for Torizon Toradex provides several base containers as a friendly starting environment
TorizonCore Containers Tags and Versioning Learn more about the tags and environment variables from TorizonCore containers
Modifying TorizonCore Debian Based Container Images How to install packages and modify a base container for custom application startup
Web Browser on Toradex Computer on Modules An overview about Web Browser support on Toradex Computer on Modules
Kiosk Mode Browser with TorizonCore How to use the Kiosk Mode Browser to display web-based Graphical User Interfaces (GUI)
Qt Qt Debian Container for Torizon Example how to bring up a Qt container for Torizon
Remote Access the TorizonCore GUI Using VNC or RDP How to enable a VNC or an RDP backend in a Weston Debian Container for Torizon

Partner Demo Containers

Partner Demo Containers are ready-to-use demonstrations fully integrated into containers.

Partner Demo Container Brief Description
Codesys Codesys Codesys PLC Runtime CODESYS programmable logic controller (PLC) demo runtime on a Torizon container and how to use it
Crank Crank Software Crank Storyboard Crank Storyboard allows you to build embedded systems optimized, rich GUI on a cross-platform IDE
BE.services Matrikon OPC UA Server BE.services
Matrikon
BE.services Matrikon OPC UA Server Matrikon OPC UA Server implementation by BE.services GmbH
TotalCross TotalCross TotalCross SDK TotalCross is an easy-to-use Open Source SDK aiming the fast designing of beautiful Graphical User Interfaces (GUIs) for multiple platforms

Third-party Containers

Container Article Brief Description
Node-RED Node-RED How to get started with Node-RED on Torizon
InfluxDB Using Multiple Containers with TorizonCore How to run multiple containers using InfluxDB and Grafana as examples
Grafana Using Multiple Containers with TorizonCore How to run multiple containers using InfluxDB and Grafana as examples

Displays

Article Brief Description
First Steps with Capacitive Touch Display 7" Parallel How to start working with the Capacitive Touch Display 7 Inch Parallel
First Steps with Resistive Touch Display 7" Parallel How to start working on the Parallel Resistive Touch Display 7 Inch Parallel
First Steps with Capacitive Touch Display 10.1 Inch LVDS How to start working with the Capacitive Touch Display 10.1 Inch LVDS
Setting up Displays with Torizon How to set up displays with Torizon
Working With Weston on TorizonCore How to customize Weston container to add some features on the graphical interface

Graphical User Interface (GUI)

Article Brief Description
Qt Getting Started with Qt Overview article including the pros and cons of using Torizon as the platform for Qt apps
Qt How to build a GUI with Qt for Python and TorizonCore How to use Qt for Python in TorizonCore, relying on the Qt Debian Container for Torizon
Blazor How to Build a GUI with ASP.NET Core and Blazor for TorizonCore Create a GUI with Blazor and display it using a Web Browser in Kiosk Mode
Crank Crank Storyboard Crank Storyboard allows you to build embedded systems optimized, rich GUI on a cross-platform IDE
TotalCross TotalCross TotalCross is an easy-to-use Open Source SDK aiming the fast designing of beautiful Graphical User Interfaces (GUIs) for multiple platforms
Remote Access the TorizonCore GUI Using VNC or RDP How to enable a VNC or an RDP backend in a Weston Debian Container for Torizon

Hardware Access

Article Brief Description
GPIO (Linux) Base GPIO article applicable to both the BSP and TorizonCore
How to Use GPIO on TorizonCore How to access GPIO using libgpiod, the new Linux kernel API for GPIO
How to Use GPIO with Torizon Visual Studio Extension How to manipulate GPIO using Torizon C/C++ Application development Visual Studio Plugin
How to Use UART on TorizonCore How to add a UART device to be accessed in a containerized application in TorizonCore
How to Use UART with Torizon VS Code Extension (Python) How to manipulate UART using Python on Visual Studio Code Extension for Torizon
How to Use UART with Torizon Visual Studio Code Extension (.NET Core) How to use the UART interface with .NET Core on Visual Studio Code Extension For Torizon
ADC (Linux) Base ADC article applicable to both the BSP and TorizonCore
How to Use ADC on TorizonCore How to access ADC through the sysfs interface in a container
Using PWM in a Container How to use PWM in a Container
How to Use I2C on Torizon How to give containers access to I2C devices in Torizon
CAN (Linux) Base CAN article applicable to both the BSP and TorizonCore
How to Use CAN on TorizonCore How to use CAN on Torizon both from the command-line and VS Code
EtherCAT How to get started with EtherCAT on Toradex modules

For a list with the entire Torizon documentation, go to the Torizon Documentation.