Getting Started using Docker¶
UX Designer version 5.1 comes with support for build using Docker containers. This introduces an easy and flexible way to install dependencies and tools for desired target CCpilot displays.
Since full Docker support in Qt Creator will be released in future version there is some issues like code validation/completion that is not working right out of the box! We have some handy fixes for this that is described in this section. Hence Docker support in UX Designer is released as a tech-preview
CrossControls docker repository is based on Ubuntu 20.04 and contains the installed Yocto SDKs for CCpilot display devices, including Qt open-source SDK. It can be used from command line or with Qt Creator 9+ that supports building with docker devices, see: https://doc.qt.io/qtcreator/creator-adding-docker-devices.html
Install¶
Installing Docker is done via Snap:
sudo snap install docker
Create, add and activate docker group:
sudo addgroup --system docker
sudo adduser $USER docker
newgrp docker
Enable and disable Docker service:
sudo snap disable docker
sudo snap enable docker
A password is required (ccs user password is default)
Restart VM
To find what SDK images that are available for CCpilot devices go to CrossControl Docker Hub.
To install the docker sdk into your build environment a tagname is required. The tag describes CCLinux and Qt versions installed. To pull the image, use:
docker pull crosscontrol/v1x00-sdk:tagname
Command line usage for compiling inside the container. Example:
docker run --rm -it -v /home/ccs/qt:/usr/local/qt crosscontrol/v1x00-sdk:3.3.0.6_qt-6.5.3
Setup Qt Creator to run with Docker¶
Add remote device by navigating to Qt Creator Devices and click Add…
Edit → Preferences... → Devices
Choose Docker Device and press Start Wizard:
Select the installed docker sdk and press Ok:
Scroll down and press Auto-detect Kit Items and all build-kits and environment settings will be setup as needed by the docker image.
Press Apply and then Ok to close.
Validate setup by navigating to Qt Creator Kits
Edit → Preferences... → Kits
Make sure that the correct complier and debugger for the docker image is used, and set Sysroot to docker://crosscontrol%2fv1x00-sdk.3.3.0.6_qt-6.5.3/opt/V1X00/sysroots/cortexa35-poky-linux.
Press apply and OK to close.
Next configure in Project Settings to use clangd to get intelisense to work properly with Docker build-kit.
Navigate to Clangd
Projects → Project Settings → Clangd
Select Use clangd instead of global settings.
Set Path to executable: navigate to the installed docker version of clang as shown in the image.
You will need to have created a project if you cannot access Project Settings it, see here.
The installed build-kit is now available for application builds for your device using cmake (qmake not supported in Qt Creator and Docker. For qmake builds the Debian SDK installation is required described here). To depoly to target with docker build-kit, see here.