Hello,
We’re still working with Torizon OS Easy Pairing 7.2.0 and Verdin iMX8M Mini DualLite 1GB.
We’ve successfully buit and debugged the Gpio cpp example with Visual Studio Code.
We’re now trying to build the application in release mode and run it on the target…
How do I build it for the arm64 target?
We’re assuming we need to run it in the pre-compiled container with libgpiod installed, provided by Toradex ? right ?
Thanks for your help.
I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.
Did you like my answer?
Hello! Great to hear that you’ve successfully built and debugged your GPIO C++ example on Torizon OS with your Verdin iMX8M Mini.
For building your application in release mode for the arm64 (aarch64) architecture, you do not need to use the pre-compiled container provided by Toradex. Instead, you should perform a release build of your project using Visual Studio Code and the Torizon IDE Extension, which will create a container image optimized for your application.
Here are the steps to build and deploy your application for release:
Update Your Dependencies
Ensure your project’s torizonPackages.json includes the required GPIO libraries:
Modify docker-compose.yml for Device Access
Make sure your docker-compose.yml includes access to the GPIO device:
devices:
- "/dev/gpiochip0"
Build your Release Image
In Visual Studio Code:
Open the Command Palette (Ctrl + Shift + P)
Type and select Torizon: Build Container Image (Release)
Select the release configuration (usually Release)
The Torizon IDE Extension will automatically build the container image for the arm64 target using cross-compilation.
Deploy the Release Image
After the build completes, you can deploy and run the image on your target device using either the “Torizon: Deploy and Debug” for a release build or by running the container manually as described in the documentation.
The resulting container image will include only the runtime dependencies (like libgpiod2), making it optimized for deployment.
More detailed documentation and a sample release configuration can be found here:
Let me know if you need details on any specific step.
This bit is incorrect, though. As pointed out in the documentation (the link I shared above), you need to use the task run-container-torizon-release-<arch>.
I am not sure if I correctly understood the question
The task run-container-torizon-release-<arch> will launch your application on the module if you make == your module’s architecture. In your case, since you are on Verdin iMX8M Mini, you can use the task run-container-torizon-release-arm64 for this.