This lesson will show how to use it, build applications, and deploy it to the target module.
In this module, you will:
For this Getting Started Guide:
For this lesson:
You need to have the following applications installed on your development machine. Please, visit the software developer page to get instructions about how to obtain it.
You will also need Toradex hardware and computer on the same network.
Note: Carefully read this module's cover page clicking on "Module 2: First Steps with Torizon" on the left menu bar before starting this lesson.
Download the Torizon support package for Visual Studio Code and Python project's Github repository.
After the download, the file will be on Downloads folder, go to that directory and extract the archives to your home folder.
Open your terminal, and type the following commands:
$ cd Downloads $ unzip python-container-master.zip -d /home/$USER $ cd ~/python-container-master/
On the uncompressed folder, create a new folder by copying the template directory:
$ cp -r template hello-world
Open Visual Studio Code. Select File-> Open Folder
Select the hello-world folder.
On the project explorer window, open the folder .vscode and click on the file settings.json.
toradexpython.targetDevice field with your board's IP or hostname.
ctrl+p and type
task deploydebugcontainer to start building.
Build the release container image will start. It should complete successfully.
Warning: Please, be sure you have ARM emulation enabled on your PC. To enable it, please refer to the previous lessons.
Note: It is also recommended to configure your SSH Key to avoid the necessity of password every time, check more about it on the Passwordless SSH Configuration.
Create a new file hello.py on the VS Code:
val = 1 print("Hello world") val = val + 1 print(val)
Put some breakpoints on the hello.py :
Press F5 to debug the hello.py script on the board. This will deploy the hello.py script from your developer computer to the Apalis iMX8 board and it will stop the execution on the breakpoints set on the previous step:
You can view variable values and use the debug tools from the VS Code normally. You can see too the output generated by the script on the DEBUG CONSOLE tab: