How do I get my QT app on my verdin with dev carrier board?

Hello, I know this is going to sound very basic, but I’ve been going through your docs for a few days now and I’ve had a really hard time getting up and running. I’ve got a new verdin plus with the dev carrier board, and I have run the example qt applications on it, but now I am trying to get my already existing app ported over and it’s been quite arduous. Can someone just put it into very simple terms for me?

I thought I could just reproduce the example of running a browser on the board inside of a docker-compose file instead of running it on the cli, then I could replace the example (calculator in this case) with my app. So I wrote a docker-compose file like this (I am not super great with docker-compose, but this makes sense to me):

matt@matt-X62:~$ cat calc.yml 
version: "2.5"
services:

  weston:
    image: torizon/weston-vivante:2
    # Accept the EULA required to run imx8 vivante graphic drivers
    environment:
     - ACCEPT_FSL_EULA=1
    # Required to get udev events from host udevd via netlink
    network_mode: host
    volumes:
      - type: bind
        source: /tmp
        target: /tmp
      - type: bind
        source: /dev
        target: /dev
      - type: bind
        source: /run/udev
        target: /run/udev
    cap_add:
      - CAP_SYS_TTY_CONFIG
    # Add device access rights through cgroup...
    device_cgroup_rules:
      # ... for tty0
      - 'c 4:0 rmw'
      # ... for tty7
      - 'c 4:7 rmw'
      # ... for /dev/input devices
      - 'c 13:* rmw'
      - 'c 199:* rmw'
      # ... for /dev/dri devices
      - 'c 226:* rmw'
    command: --developer weston-launch --tty=/dev/tty7 --user=torizon
    healthcheck:
        test: ["CMD", "test", "-S", "/tmp/.X11-unix/X0"]
        interval: 5s
        timeout: 4s
        retries: 6
        start_period: 10s

  kiosk:
    image: torizon/qt5-wayland-examples-vivante:$CT_TAG_QT5_WAYLAND_EXAMPLES_VIVANTE
    security_opt:
      - seccomp:unconfined
    command: /usr/lib/aarch64-linux-gnu/qt5/examples/widgets/widgets/calculator/calculator
    shm_size: '256mb'
    device_cgroup_rules:
      # ... for /dev/dri devices
      - 'c 226:* rmw'
    volumes:
      - type: bind
        source: /tmp
        target: /tmp
      - type: bind
        source: /var/run/dbus
        target: /var/run/dbus
      - type: bind
        source: /dev/dri
        target: /dev/dri
    depends_on:
      weston:
        condition: service_healthy

I assumed that this would fail, but there was no apparent way to get an error message out of your gui. It just says “Component Installation Failed”.

I read through some more documentation then figured I should try the vscode qt plugin, but that was a whole other exercise in failure. Although the plugin does see my board, it can never connect over ssh. It always says:

"[04-12 00:12:25.866] Unreachable devices:

Toradex Verdin iMX8M Plus WB on Verdin Development Board(14762939)

Make sure the devices are turned on and connected to the network"

I can ssh into the board just fine myself. Does it need a specific container running to use this plugin? There’s nothing about that in the docs unless I missed something (I am admittedly bleary-eyed at this point). I re-flashed my verdin with what appeared to be the default torizon image, but now I get no on-screen display. I figured that was fine because I could still ssh in no problem. However, the plugin still can’t ssh into it. Aside from that I try to build the project with the plugin and I get: “Project ERROR: Unknown module(s) in QT: core gui network widgets multimedia multimediawidgets serialport”

Ok, that’s fine, there’s an over-edited and very blurry video in the instructions that shows I have to list these in devpackages. I painstakingly copy and paste about 30 dependency names in that tiny text input and run it again. Apt goes through and installs everything and right when it finishes vs code goes all blank and says there was a container error. There’s no more detail than that. All I can do is try to build it again, and I’m now stuck in a loop.

When I open the project I get a warning that says: “Current configuration has been changed, you may need to do a clean rebuild of your code to ensure that the generated binaries match the currently selected architecture.”

Isn’t building the project what I’m trying to do currently? I’m not really sure what this is intended to convey.

Anyway, all I really want to know is that I’m headed in the right, or at least a useful direction. I’m not complaining really, because I recognize that it’s sort of assumed I’ll have the knowledge to fill in some of these gaps, but I guess I just don’t. Can someone point me to some clear instructions on what I’m missing here?

Hi @munderwoods ,

Welcome to our community! I’ll try to clarify some of your questions.

I thought I could just reproduce the example of running a browser on the board inside of a docker-compose file instead of running it on the cli, then I could replace the example (calculator in this case) with my app. So I wrote a docker-compose file like this (I am not super great with docker-compose, but this makes sense to me):

Comparing the qt5-wayland-examples-vivante parameters you put in the Docker Compose file with the docker run arguments listed on this article: Qt on Torizon OS | Toradex Developer Center specifically in the 64-bit i.MX8 SoCs tab, there are some parameters you didn’t put that are necessary in order to run the container:

  • Bind mounting /dev/galcore which is the Vivante GPU present on the iMX8M Plus;
  • --device-cgroup-rule='c 199:* rmw' also related to the Vivante GPU.

So your docker-compose.yml should be like this:

docker-compose.yml
version: "2.5"
services:

  weston:
    image: torizon/weston-vivante:2
    # Accept the EULA required to run imx8 vivante graphic drivers
    environment:
     - ACCEPT_FSL_EULA=1
    # Required to get udev events from host udevd via netlink
    network_mode: host
    volumes:
      - type: bind
        source: /tmp
        target: /tmp
      - type: bind
        source: /dev
        target: /dev
      - type: bind
        source: /run/udev
        target: /run/udev
    cap_add:
      - CAP_SYS_TTY_CONFIG
    # Add device access rights through cgroup...
    device_cgroup_rules:
      # ... for tty0
      - 'c 4:0 rmw'
      # ... for tty7
      - 'c 4:7 rmw'
      # ... for /dev/input devices
      - 'c 13:* rmw'
      - 'c 199:* rmw'
      # ... for /dev/dri devices
      - 'c 226:* rmw'
    command: --developer weston-launch --tty=/dev/tty7 --user=torizon
    healthcheck:
        test: ["CMD", "test", "-S", "/tmp/.X11-unix/X0"]
        interval: 5s
        timeout: 4s
        retries: 6
        start_period: 10s

  kiosk:
    image: torizon/qt5-wayland-examples-vivante:$CT_TAG_QT5_WAYLAND_EXAMPLES_VIVANTE
    security_opt:
      - seccomp:unconfined
    command: /usr/lib/aarch64-linux-gnu/qt5/examples/widgets/widgets/calculator/calculator
    shm_size: '256mb'
    device_cgroup_rules:
      # ... for /dev/dri devices
      - 'c 226:* rmw'
      - 'c 199:* rmw'
    volumes:
      - type: bind
        source: /tmp
        target: /tmp
      - type: bind
        source: /var/run/dbus
        target: /var/run/dbus
      - type: bind
        source: /dev/dri
        target: /dev/dri
      - type: bind
        source: /dev/galcore
        target: /dev/galcore

    depends_on:
      weston:
        condition: service_healthy

I tested the Compose file above on a Verdin Plus and the calculator app started as expected.

I read through some more documentation then figured I should try the vscode qt plugin, but that was a whole other exercise in failure. Although the plugin does see my board, it can never connect over ssh.

You mean our Torizon IDE extension for VSCode?

I can ssh into the board just fine myself. Does it need a specific container running to use this plugin? There’s nothing about that in the docs unless I missed something (I am admittedly bleary-eyed at this point).

You shouldn’t need to have a specific container on the module in order to use our extension; the only initial requirement is TorizonCore installed on the SoM.

I re-flashed my verdin with what appeared to be the default torizon image, but now I get no on-screen display. I figured that was fine because I could still ssh in no problem. However, the plugin still can’t ssh into it. Aside from that I try to build the project with the plugin and I get: “Project ERROR: Unknown module(s) in QT: core gui network widgets multimedia multimediawidgets serialport”

Note that if you reinstall TorizonCore on the module you need to remove the device on the extension then add it again. If you get no on-screen display on your first boot after install you probably installed TorizonCore without any containers included in it, so there would be nothing to be displayed in this case. What version of TorizonCore did you install?

Ok, that’s fine, there’s an over-edited and very blurry video in the instructions that shows I have to list these in devpackages. I painstakingly copy and paste about 30 dependency names in that tiny text input and run it again. Apt goes through and installs everything and right when it finishes vs code goes all blank and says there was a container error. There’s no more detail than that. All I can do is try to build it again, and I’m now stuck in a loop.

Can you show which article exactly were you following?

When I open the project I get a warning that says: “Current configuration has been changed, you may need to do a clean rebuild of your code to ensure that the generated binaries match the currently selected architecture.”

The message appears when you change some settings related to your project like devpackages and extrapackages. This is because your app will be compiled and executed inside containers, so if you add packages/dependencies to your project these containers need to be rebuilt in order to have your additions. You can rebuild them manually, but I recommend trying V2 of the extension, as I’ll detail below.

Given that you mentioned devpackages you’re using V1 of the extension. If you’re just getting started on your project, I’d recommend that you try using Torizon IDE extension V2 instead, which is a complete rewrite that should be a more straightforward solution for those more familiarized with Docker/Docker Compose. Try reading the Resources section and see if you can set up a basic Qt project with it.

Best regards,
Lucas Akira

Thanks for this very helpful reply. This is the guide I was following for the vscode extension for posterity: Qt C++ Application Development on Torizon Using Visual Studio Code | Toradex Developer Center

I installed v2 of the plugin, and it sees the verdin on my network. I ssh’d into the board and set the password for the user “torizon”. I can’t ssh in with the user I created in the web interface, so I assume I’m supposed to use “torizon” here in the plugin. However, when I try to connect via the plugin I get this output:

[05-12 11:18:11.138] Trying to connect to 10.0.0.27
[05-12 11:18:20.635] ERROR :: Error trying to connect to verdin-imx8mp-14762939.local : undefined

As for your docker-compose file, I have my verdin flashed on TorizonCore 6, and have registered it with your device manager web app (https://app.torizon.io/). I was trying to run it that way, but it fails and gives no useful output:

05/12/2023 11:36:23:000 AM
Component Installation Failed
05/12/2023 11:36:23:000 AM
Component Installation Started
05/12/2023 11:36:22:000 AM
Component Target Download Completed Successfully
05/12/2023 11:36:21:000 AM
Component Target Download Started

I scp’d it over to the verdin manually with docker-compose up and got this output:
log (13.6 KB)

Am I missing a step here? I should mention I’m running it through the hdmi on my dev board. The display definitely works and is recognized properly since I’ve run your other examples on it previously. It currently shows a black screen, but the display remains active.

Just to take a step back, can you confirm that these are the correct paths I should be going down to start development on the board? It’s a little confusing because there seem to be a few different routes to go down and there’s overlapping documentation for each of them. My overall goal is to port my already existing qt app to the board just so that I can potentially demo it for upper management and convince them to invest in the hardware. So I assume I’ll need to cross-compile my QT app to arm, is that handled in the vscode plugin as well, or qtcreator, or do I need a separate tool-chain? Thanks again for bearing with me, I’ll be fine on my own once I get a build running that I can iterate on.

Hi I went through a lot of this for the iMX8MM on a Verdin. I had a lot of issues with Torizon and the VSCode plugin (and Docker, etc.) and gave up on that.

Instead, I used the multimedia image provided by Toradex. That’s based on a Yocto build for your SoM. While you can use the multimedia image out of the box and it shows a Qt5 app (the Cinematic thingy), you can actually kill that app and run your own.

You’ll need to follow the instructions to run through the Yocto build, mainly to produce the SDK. You don’t need to build the distro. Once the SDK shell script is created (it’s quite big and takes a while to produce), install that on your host Linux machine. I had some issues w/ the Yocto build steps, so use Ubuntu (20.x or 22.x) or a tested Linux host (per the Yocto folks) on a dedicated machine (not using VM although that might (and should) work).

The instructions to build a Qt app are not that clear but there are videos for setting up and managing a custom kit and using CMake (look up Burkhard Stubert and his videos and such) that you do in a console that’s run the SDK environment script for the cross tool chain. Qt Creator has/had a bug in the recent version (I confirmed with the Qt folks) which prevents that new managed kit from working correctly in Qt Creator for your project. But…you can run CMake from the command line in the same console where the cross toolchain is configured and it will succeed allowing you to cross build a Qt app for your target. You can then scp that to the target (and even cross debug!). Be sure what you build is for the target architecture (use the file command to check if you didn’t know that). This will ensure you properly did the cross compile.

Now, with all that said, I will share other things that I learned recently. For my project, using Qt properly with their license model is quite expensive. I went through the above exercise to see if it was an option and I could get it to work. Qt is great but you need to ensure you follow the licensing. If your company can pay the license fee, great! Due to cost of Qt, I decided to go another route. But again, there’s nothing wrong with Qt, it’s a powerful framework for sure!

This process was challenging due to the Qt Creator bug, needing to do the Yocto build (challenges using a VM for Ubuntu and originally under Mint), etc. It all opened a can of worms about what the multimedia image is and what it contains. As such, I/we are pursuing creating a Yocto build mostly from scratch, eliminating the Qt stuff completely, amongst other things. This is a best practice anyway as the Toradex image is really for demo purposed, not a production distro. I had just hoped to use it as-is for a proof of concept.

This is all quite non-trivial and assumes a lot of information/experience/knowledge about a LOT of stuff! I likely went way beyond what you asked and just sharing some experiences!

Hi mswtech,

Do you mind sharing what GUI framework you selected for the IMX8MM? I’ve been considering Qt for my project, but would be interested in less expensive options.

Thanks,
Rob

Thanks a bunch for your helpful and candid response. Obviously it doesn’t exactly thrill me, and it’s probably going to be a bit much for me to get into yocto at this point and set up a whole cmake build process in a short amount of time. I did make a non-trivial investment in the hardware based partially on the marketing around this qt to docker functionality, but I will definitely try this as well if I don’t have success on that front and when I can dedicate time to it.

On the upside, I was able to build my qt project on the verdin itself by installing the dependencies in the qt5-wayland-examples-vivante image on top of torizon-core 5 (for some reason whenever I try to run a qt app in 6 it fails) and it runs great. It’s not a good long-term solution, but it’s enough for a prototype. I just need to make it so its not being displayed over the torizon webapp now on my screen… and dockerize it. I’ll probably hit another roadblock there shortly, but I’ll let you know. Thanks again for the help.

Here are the dependencies I install to build the qt app:
apt install qtmultimedia5-dev libqt5multimedia5-plugins libqt5serialbus5 libqt5serialbus5-dev libtesseract-dev tesseract-ocr make g++ libqt5serialport5 libqt5serialport5-dev qtbase5-dev libegl-dev libegl1

Then you just gotta make sure to delete any existing makefile and your .o files, then run qmake and make.

Hi @munderwoods ,

Thanks for this very helpful reply. This is the guide I was following for the vscode extension for posterity: Qt C++ Application Development on Torizon Using Visual Studio Code | Toradex Developer Center

This guide was made specifically for V1 of the extension and it isn’t valid for V2. I’ll talk internally about doing some changes to the article to make it clearer that it only applies to V1.

I can’t ssh in with the user I created in the web interface, so I assume I’m supposed to use “torizon” here in the plugin.

By web interface you mean the account you created in https://app.torizon.io/? It doesn’t necessarily use the same login credentials that you use on your SoM.

I installed v2 of the plugin, and it sees the verdin on my network. I ssh’d into the board and set the password for the user “torizon”.However, when I try to connect via the plugin I get this output:

[05-12 11:18:11.138] Trying to connect to 10.0.0.27
[05-12 11:18:20.635] ERROR :: Error trying to connect to verdin-imx8mp-14762939.local : undefined

So you received this message on V2 of the extension after changing the password for user torizon, is this correct? I’m asking because I am only able to reproduce this when trying to connect to a module that didn’t have the password changed i.e. with the default password set as torizon.

As for your docker-compose file, I have my verdin flashed on TorizonCore 6, and have registered it with your device manager web app (https://app.torizon.io/). I was trying to run it that way, but it fails and gives no useful output:

I tried running the docker compose file with an online update and it did fail. The cause was that the environment variable CT_TAG_QT5_WAYLAND_EXAMPLES_VIVANTE referenced in the docker compose file isn’t set when using our platform services. The update worked after I changed the compose file from:

torizon/qt5-wayland-examples-vivante:$CT_TAG_QT5_WAYLAND_EXAMPLES_VIVANTE

to

torizon/qt5-wayland-examples-vivante:2

To get more useful logs during an update you can see the Aktualizr logs from your module:

journalctl -u aktualizr* -f

I scp’d it over to the verdin manually with docker-compose up and got this output:

I took a look at your log file, and apparently Weston initiates correctly up until the last moment, when it suddenly exits without giving too much details. I wasn’t able to reproduce this on my Verdin Plus with dev board running TorizonCore 6.2. You shouldn’t need to do anything else other than start the containers with Docker Compose: Weston should initiate then the Calculator app should appear soon after that.

Just to be sure, can you try connecting to another HDMI display and see if you get an image?

Just to take a step back, can you confirm that these are the correct paths I should be going down to start development on the board? It’s a little confusing because there seem to be a few different routes to go down and there’s overlapping documentation for each of them. My overall goal is to port my already existing qt app to the board just so that I can potentially demo it for upper management and convince them to invest in the hardware. So I assume I’ll need to cross-compile my QT app to arm, is that handled in the vscode plugin as well, or qtcreator, or do I need a separate tool-chain? Thanks again for bearing with me, I’ll be fine on my own once I get a build running that I can iterate on.

From your logs I saw that you’re using TorizonCore 6. In this case we recommend using Torizon IDE Extension V2 for development, as it creates an environment that takes care of cross-compilation, facilitates debugging code on the module, and you can start a project from one of the available templates, including a C++ Qt QML one.

If you plan on using V2 of the extension then we recommend reading through each article mentioned in the Resources section of the IDE Extension page in order.

Best regards,
Lucas Akira

This all sounds SO familiar. Similar issues/struggles here. I’m glad you have something working for a prototype. Qt licensing cost was an issue for me (and issues using Torizon/Docker) so I had to abandon that path.

Yeah because of how our service is delivered I think we can still use open source.

By web interface you mean the account you created in https://app.torizon.io/? It doesn’t necessarily use the same login credentials that you use on your SoM.

No, I meant the web interface you get when connecting to the verdin on LAN, or the interface that displays on the screen in torizon-core 5.

So you received this message on V2 of the extension after changing the password for user torizon , is this correct? I’m asking because I am only able to reproduce this when trying to connect to a module that didn’t have the password changed i.e. with the default password set as torizon .

Yes, I’ve ssh’d into and out of it a bunch of times, tried the password a bunch of times, and always the same result. I have to ssh as torizon using the password that I set when it asked me to in the cli, the password is definitely not “torizon”.

It looks like it was actually because of the special characters in my password. I changed it to 1234 and now the plugin connects. Why would that be the case? Is it doing some weird handling of the password outside of regular ssh and scp stuff?

I’ll try setting up the dockerfile now like you suggested and play with the plugin a bit since I’ve got that going. I’ll let you know how I fare, thanks.

Now I’ve got the docker-compose.yml working fine and my app is running on it, but I can’t get the vscode plugin to work still. Now I’m getting this output when trying to import the project:

[105 ms] Dev Containers 0.292.0 in VS Code 1.78.2 (b3e4e68a0bc097f0ae7907b217c1119af9e03435).
[103 ms] Start: Resolving Remote
[219 ms] Setting up container for folder or workspace: /home/matt/luxer/luxer-kiosk
[220 ms] Host: tcp://10.0.0.27:2375
[227 ms] Start: Check Docker is running
[228 ms] Start: Run: docker version --format {{.Server.APIVersion}}
[351 ms] Server API version: 1.40
[354 ms] Start: Run: docker volume ls -q
[418 ms] Start: Run: docker ps -q -a --filter label=vsch.local.folder=/home/matt/luxer/luxer-kiosk --filter label=vsch.quality=stable
[470 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/matt/luxer/luxer-kiosk --filter label=devcontainer.config_file=/home/matt/luxer/luxer-kiosk/.devcontainer/devcontainer.json
[521 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/matt/luxer/luxer-kiosk
[578 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/matt/luxer/luxer-kiosk
[629 ms] Start: Run: /snap/code/129/usr/share/code/code --ms-enable-electron-run-as-node /home/matt/.vscode/extensions/ms-vscode-remote.remote-containers-0.292.0/dist/spec-node/devContainersSpecCLI.js read-configuration --workspace-folder /home/matt/luxer/luxer-kiosk --id-label devcontainer.local_folder=/home/matt/luxer/luxer-kiosk --id-label devcontainer.config_file=/home/matt/luxer/luxer-kiosk/.devcontainer/devcontainer.json --log-level debug --log-format json --config /home/matt/luxer/luxer-kiosk/.devcontainer/devcontainer.json --mount-workspace-git-root true
[1121 ms] @devcontainers/cli 0.40.0. Node.js v16.17.1. linux 5.15.0-71-generic x64.
[1121 ms] Start: Run: git rev-parse --show-cdup
[1136 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/matt/luxer/luxer-kiosk --filter label=devcontainer.config_file=/home/matt/luxer/luxer-kiosk/.devcontainer/devcontainer.json
[1200 ms] Start: Run: /snap/code/129/usr/share/code/code --ms-enable-electron-run-as-node /home/matt/.vscode/extensions/ms-vscode-remote.remote-containers-0.292.0/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /home/matt/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --container-session-data-folder /tmp/devcontainers-0cb89c90-bf0c-4d72-949d-b2b8fd441e601684191208407 --workspace-folder /home/matt/luxer/luxer-kiosk --workspace-mount-consistency cached --id-label devcontainer.local_folder=/home/matt/luxer/luxer-kiosk --id-label devcontainer.config_file=/home/matt/luxer/luxer-kiosk/.devcontainer/devcontainer.json --log-level debug --log-format json --config /home/matt/luxer/luxer-kiosk/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[1805 ms] @devcontainers/cli 0.40.0. Node.js v16.17.1. linux 5.15.0-71-generic x64.
[1805 ms] Start: Run: docker buildx version
[1967 ms] GitHub - docker/buildx: Docker CLI plugin for extended build capabilities with BuildKit v0.9.1-docker ed00243a0ce2a0aee75311b06e32d33b44729689
[1967 ms]
[1968 ms] Start: Resolving Remote
[1976 ms] Start: Run: git rev-parse --show-cdup
[1985 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/matt/luxer/luxer-kiosk --filter label=devcontainer.config_file=/home/matt/luxer/luxer-kiosk/.devcontainer/devcontainer.json
[2046 ms] Start: Run: docker inspect --type image luxer-kiosk_arm64v8-qt5-vivante-no-ssh_bullseye_debug_d7851ee7-63d3-41e6-86ba-d853a38d14bf_sdk_image
[3635 ms] Error fetching image details: No manifest found for Docker.
[3636 ms] Start: Run: docker pull luxer-kiosk_arm64v8-qt5-vivante-no-ssh_bullseye_debug_d7851ee7-63d3-41e6-86ba-d853a38d14bf_sdk_image
Using default tag: latest
Error response from daemon: pull access denied for luxer-kiosk_arm64v8-qt5-vivante-no-ssh_bullseye_debug_d7851ee7-63d3-41e6-86ba-d853a38d14bf_sdk_image, repository does not exist or may require ‘docker login’: denied: requested access to the resource is denied
[4484 ms]
[4484 ms] Error: No such image: luxer-kiosk_arm64v8-qt5-vivante-no-ssh_bullseye_debug_d7851ee7-63d3-41e6-86ba-d853a38d14bf_sdk_image
[4486 ms] Error: Command failed: docker inspect --type image luxer-kiosk_arm64v8-qt5-vivante-no-ssh_bullseye_debug_d7851ee7-63d3-41e6-86ba-d853a38d14bf_sdk_image
[4486 ms] at Tse (/home/matt/.vscode/extensions/ms-vscode-remote.remote-containers-0.292.0/dist/spec-node/devContainersSpecCLI.js:1946:3264)
[4487 ms] at rO (/home/matt/.vscode/extensions/ms-vscode-remote.remote-containers-0.292.0/dist/spec-node/devContainersSpecCLI.js:1946:3200)
[4487 ms] at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
[4487 ms] at async Xse (/home/matt/.vscode/extensions/ms-vscode-remote.remote-containers-0.292.0/dist/spec-node/devContainersSpecCLI.js:1961:2626)
[4488 ms] at async vh (/home/matt/.vscode/extensions/ms-vscode-remote.remote-containers-0.292.0/dist/spec-node/devContainersSpecCLI.js:1961:3741)
[4488 ms] at async gae (/home/matt/.vscode/extensions/ms-vscode-remote.remote-containers-0.292.0/dist/spec-node/devContainersSpecCLI.js:2092:10213)
[4488 ms] at async mae (/home/matt/.vscode/extensions/ms-vscode-remote.remote-containers-0.292.0/dist/spec-node/devContainersSpecCLI.js:2092:9954)
[4494 ms] Exit code 1
[4502 ms] Command failed: /snap/code/129/usr/share/code/code --ms-enable-electron-run-as-node /home/matt/.vscode/extensions/ms-vscode-remote.remote-containers-0.292.0/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /home/matt/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --container-session-data-folder /tmp/devcontainers-0cb89c90-bf0c-4d72-949d-b2b8fd441e601684191208407 --workspace-folder /home/matt/luxer/luxer-kiosk --workspace-mount-consistency cached --id-label devcontainer.local_folder=/home/matt/luxer/luxer-kiosk --id-label devcontainer.config_file=/home/matt/luxer/luxer-kiosk/.devcontainer/devcontainer.json --log-level debug --log-format json --config /home/matt/luxer/luxer-kiosk/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[4503 ms] Exit code 1

I’ve tried just pulling the image it’s looking for in my cli and I get the same error.

Hi @munderwoods ,

No, I meant the web interface you get when connecting to the verdin on LAN, or the interface that displays on the screen in torizon-core 5.

You’re probably talking about Portainer then. It is a graphical container manager included in our TorizonCore images with evaluation containers, and it asks for login when first using it. It is a local account only, not related to the TorizonCore login account.

It looks like it was actually because of the special characters in my password. I changed it to 1234 and now the plugin connects. Why would that be the case? Is it doing some weird handling of the password outside of regular ssh and scp stuff?

I was able to reproduce this behavior with a few characters present in the password, like $, #, &, etc. It definitely is a bug, and I passed this info internally to the extension team, so thanks for reporting it!

Now I’ve got the docker-compose.yml working fine and my app is running on it, but I can’t get the vscode plugin to work still. Now I’m getting this output when trying to import the project:

Looking at the output I see references to devcontainer, which we used in V1 projects. Are you trying to import a V1 project on V2 of the extension? They’re not directly compatible with one another, you would have to create a new Qt/C++ project on V2 then copy the source files to it.

Best regards,
Lucas Akira

So based on your comment I recognize that the problem I was having with the vscode plugin was probably that I tried to import my work dir into the first version of the extension, which generated a bunch of files, then tried to import it with the second version of the extension while all those files were still in the directory. However, I’ve deleted all those files now and I seem to be making less progress than ever. Is the documentation I should be following now this? GitHub - toradex/torizon-experimental-torizon-ide-v2-docs: VS Code Torizon Integrated Development Environment Documentation

If so, I don’t understand why it’s separate from the rest of your documentation. I highly suggest updating this and making it clear what I should be following because when I use your web tool that lets you select your hardware and what kind of app you want to build, this isn’t mentioned anywhere.

I’ve got v2 of the plugin set up now, and I’m trying to just create a c++ app from your template. I tried the qt app but it failed to install qmake every time. This one actually makes it to where I can deploy to the board, but this command fails after exactly thirty seconds every time:

 *  Executing task: sshpass -p 1234 ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no torizon@192.168.1.5 LOCAL_REGISTRY=192.168.135.34 TAG=arm64 docker-compose pull t-debug 

Warning: Permanently added '192.168.1.5' (ECDSA) to the list of known hosts.
The DOCKER_LOGIN variable is not set. Defaulting to a blank string.
Pulling t-debug ... 
Pulling t-debug ... error

ERROR: for t-debug  Get "http://192.168.135.34:5002/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
Get "http://192.168.135.34:5002/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

 *  The terminal process "sshpass '-p', '1234', 'ssh', '-o', 'UserKnownHostsFile=/dev/null', '-o', 'StrictHostKeyChecking=no', 'torizon@192.168.1.5', 'LOCAL_REGISTRY=192.168.135.34 TAG=arm64 docker-compose pull t-debug'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it

I have to assume that there’s a 30 second timeout on the request for some reason and it’s just running up against my slow office internet.

Anyway, there doesn’t appear to be any documentation on importing a qt5 app here, which is what I need to do. If I can actually get this running on better internet, then what would be the procedure for that?

Hi @munderwoods ,

So based on your comment I recognize that the problem I was having with the vscode plugin was probably that I tried to import my work dir into the first version of the extension, which generated a bunch of files, then tried to import it with the second version of the extension while all those files were still in the directory. However, I’ve deleted all those files now and I seem to be making less progress than ever. Is the documentation I should be following now this? GitHub - toradex/torizon-experimental-torizon-ide-v2-docs: VS Code Torizon Integrated Development Environment Documentation

That’s the reference documentation for V2 which we use as a base for our developer site articles on V2.

If so, I don’t understand why it’s separate from the rest of your documentation. I highly suggest updating this and making it clear what I should be following because when I use your web tool that lets you select your hardware and what kind of app you want to build, this isn’t mentioned anywhere.

The GitHub link you mentioned is more focused on how V2 works under-the-hood rather than being a step-by-step usage guide as our developer articles usually are. The Resources section of the IDE Extension page will be updated with more articles in the next few weeks, and you should follow the articles mentioned there if you haven’t done so.

I’ve got v2 of the plugin set up now, and I’m trying to just create a c++ app from your template. I tried the qt app but it failed to install qmake every time. This one actually makes it to where I can deploy to the board, but this command fails after exactly thirty seconds every time

Can you give more details about the qmake error? I created a Qt template project on V2 and it works on my side.

I have to assume that there’s a 30 second timeout on the request for some reason and it’s just running up against my slow office internet.

The error messages suggest that this problem could be related to your local network. Is the module in the same network as your development PC?

Anyway, there doesn’t appear to be any documentation on importing a qt5 app here, which is what I need to do. If I can actually get this running on better internet, then what would be the procedure for that?

Currently V2 doesn’t have an import feature yet: You’d have to manually create a new project on V2 then copy the relevant source and header files from the older project to the newer one.

Best regards,
Lucas Akira

OK running on my home network I was able to run the C++ example project. From there I copied my c++ files into the src dir of that project and started filling out dependencies. This is how my torizonPackages.json file looks now:

{
    "deps": [
        "qt5-qmake",
        "qtdeclarative5-dev",
        "qtmultimedia5-dev",
        "libqt5multimedia5-plugins",
        "libqt5serialbus5",
        "libqt5serialbus5-dev",
        "libtesseract-dev",
        "tesseract-ocr",
        "libqt5gui5",
        "libqt5quick5",
        "libgl1",
        "qtbase5-dev"
    ],
    "devDeps": [
        "qt5-qmake",
        "qtdeclarative5-dev",
        "qtmultimedia5-dev",
        "libqt5multimedia5-plugins",
        "libqt5serialbus5",
        "libqt5serialbus5-dev",
        "libtesseract-dev",
        "tesseract-ocr",
        "libqt5gui5",
        "libqt5quick5",
        "libgl1",
        "qtbase5-dev"
    ]
}

The output I get from apt is this:

The following packages have unmet dependencies:
 imx-gpu-viv-wayland:arm64 : Depends: libdrm2:arm64 (>= 2.4.71) but it is not going to be installed
                             Conflicts: libgl1:arm64
 libglx0:arm64 : Depends: libglx-mesa0:arm64 but it is not installable
 libgstreamer-gl1.0-0:arm64 : Depends: libdrm2:arm64 (>= 2.4.17) but it is not going to be installed
 libqt5gui5:arm64 : Depends: libdrm2:arm64 (>= 2.4.62) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

So if I add libdrm2 to my dependencies to make the file look like this:

{
    "deps": [
        "qt5-qmake",
        "qtdeclarative5-dev",
        "qtmultimedia5-dev",
        "libqt5multimedia5-plugins",
        "libqt5serialbus5",
        "libqt5serialbus5-dev",
        "libtesseract-dev",
        "tesseract-ocr",
        "libdrm2",
        "libqt5gui5",
        "libqt5quick5",
        "libgl1",
        "qtbase5-dev"
    ],
    "devDeps": [
        "qt5-qmake",
        "qtdeclarative5-dev",
        "qtmultimedia5-dev",
        "libqt5multimedia5-plugins",
        "libqt5serialbus5",
        "libqt5serialbus5-dev",
        "libtesseract-dev",
        "tesseract-ocr",
        "libdrm2",
        "libqt5gui5",
        "libqt5quick5",
        "libgl1",
        "qtbase5-dev"
    ]
}

Now I get:

The following packages have unmet dependencies:
 libdrm2 : Breaks: libdrm2:arm64 (!= 2.4.114-1+b1) but 2.4.109-2+toradex2 is to be installed
 libdrm2:arm64 : Breaks: libdrm2 (!= 2.4.109-2+toradex2) but 2.4.114-1+b1 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

I can’t seem to resolve this and since it references toradex I figure I should ask you.

Hi @munderwoods ,

I used both of your torizonPackages.json files on a new QT 6 project on V2 and I didn’t encounter any errors.

Some of our containers e.g. torizon/wayland-base-vivante have some graphical packages specifically made for the Vivante GPU present in some i.MX SoCs, like the one on the Verdin Plus. These packages are provided in our feeds and are used to build our Debian images, so that’s why you saw some of these being tagged with toradex.

About the dependency issue: Are you using any Docker-related files from V1 on V2, or mixing Dockerfile commands from V1 on V2? The SDK Dockerfile on V1 is based on a different image from the one used on V2, and it shouldn’t be compatible out-of-the-box. Make sure you’re using the Dockerfiles from V2.

Also I’d recommend that you don’t install some graphical packages like libgl1 from the Debian feeds, as the Vivante equivalent ones should be already included in torizon/wayland-base-vivante.

Best regards,
Lucas Akira

OK so firstly I should say that this is a qt5 project and not qt6 just to be clear. I thought I could just use a c++ template and that would be simpler to add my dependencies to and work from but that doesn’t appear to work. I switched to building from a qt6 template. It’s a totally fresh directory unchanged from your template. It threw an exception when I tried to run it, but it was in the actual code which I wasn’t going to use so I ignored it. From there I over-wrote main.cpp with my own, as well as the .pro file (but not the .pro.user or .pro.qtds because I don’t know what those are or if I need them), and copied the rest of my dependencies into the directory which are just more c++ files and some images. I then added the previously referenced packages to the torizonPackages.json file. I ran the build and this time it went ahead and set up the dependencies fine. However, now I get this error:

Project ERROR: Unknown module(s) in QT: multimedia multimediawidgets serialport

Of course these should be covered by the following packages in my torizonPackages.json file:
“qtmultimedia5-dev”,
“libqt5multimedia5-plugins”,
“libqt5serialbus5”,
“libqt5serialbus5-dev”,

Why would it not see these packages?

Hi @munderwoods ,

Project ERROR: Unknown module(s) in QT: multimedia multimediawidgets serialport

Given that you’re using the Qt 6 template it assumes that’s the version being used, so it will try to search the Qt 6 version of these packages.

You can try changing to Qt 5 by removing the Qt 6 packages in the Dockerfiles (and adding the Qt 5 ones like you did), replacing qmake6 for qmake in .vscode/tasks.json and deleting the object files in aarch64/debug/.obj/. Overall, for a developer, this shouldn’t be any different than setting up your build environment on a Linux host.

Another option would be to port your app to Qt 6: Depending on what packages you’re using this could be an easier alternative.

Best regards,
Lucas Akira


I was able to get it attempting to build by following the steps you described, thanks for that. However, when running it I get this error that doesn’t appear to actually tell me anything. I got the same error when running the default qt6 template project. I don’t know how much this is a you thing and how much it’s a vscode thing, but do you have any insight on how I can actually see what’s wrong here? I also do not use vscode normally so perhaps part of the problem is my ignorance in that regard.

Hi @munderwoods ,

This error can happen if the Weston container doesn’t start up successfully. Make sure that it is starting correctly.

If Weston by itself is running OK, then you can try to enter inside the container that has your app, manually execute it then see what message appears.

To do this:

  • On your SoM, check that both Weston and the app container are up:
docker ps -a
  • If both are up and running, enter inside the app container:
docker exec -it <app-container-name> bash
  • You will enter inside it as root. Go to /home/torizon/app/
cd /home/torizon/app/
  • Run the app executable:
./<app-name>

Hope this helps you.

Best regards,
Lucas Akira