Skip to main content
Version: Torizon OS 6.x.y

Create a Single-Container Project

Introduction

This article guides you on creating a single-container project using the Torizon IDE Extension. The extension provides templates to start from and automates the dependency installation process. By the end of this article, you will be ready to choose the correct template for your project and start your application development.

info

The instructions of this article work for both Linux and Windows environments. When required for a particular OS environment, additional instructions will be provided.

Prerequisites

Start a New Project from a Template

  1. Create a new project:

    1. Open a new VS Code window (Ctrl + Shift + N).
    2. Click the Explorer icon (1) on the left menu bar.
    3. There will be two buttons for creating projects. Click New Torizon Project (2).
  2. Select a template: You will see a new tab with a list of templates that can be used for project creation. Select the template that closely matches your project requirements.

    info

    Note that there are Toradex-supported, partner-supported and community-supported templates. Toradex-supported templates contain development stacks commonly used by customers of Torizon Cloud. Those templates are maintained by the Toradex team and pass through a quality assurance process. The quality and maintenance of partner and community templates are the sole responsibility of their contributors.

  3. Input the project name, container name and creation path. Then, click Create Project:

    • Use only letters and numbers in your project name.
    • The container name also accepts the - symbol.
    • The Creation path is the system folder in which the project files will be stored.

    You can monitor the project creation by checking the terminal at the bottom of the VS Code interface.

    After configuring the project, VS Code will reload the window using the newly created project as the default workspace, enabling the use of VS Code debugger and tasks.

  4. During the first load of a new project, the following tasks are triggered:

    • run-torizon-binfmt: It runs the torizon/binfmt Docker image to register foreign architecture interpreters, which is necessary to build containers for the ARM architecture.

    • run-docker-registry: It runs a local Docker registry to enable optimized image exchange between the development PC and the target device.

    • run-share-wsl-ports (Windows-only): By default, services created on a WSL 2 distro are not visible to the external network. This task runs a PowerShell script on the Windows side. That script binds the necessary ports in WSL to make it accessible from the target device. Since that requires administrator user permissions, a User Account Control window will appear:

      Click Yes. After the confirmation, a new empty terminal will pop up. Do not close it. The terminal will run the script and then will close automatically.

  5. Check for dependencies on your system: During the first load of a new project, the notification Do you want to check for dependencies on your system? will appear. Click Yes.

    The extension will then trigger the check-deps task: This task checks the necessary local packages (on the development host, such as SDKs) to build the project. If there are missing packages, it tries to install them.

    tip

    You can manually trigger the check-deps task. For more information, see Workspace - Tasks.

    Confirm the installation and your sudo password will be requested.

  6. Proceed with your project development: Now you can remotely debug your project.



Send Feedback!