How to Build Applications with QTCreator and Yocto SDK
This application note will guide you through the steps needed, to integrate a Yocto SDK to QTDesigner.
The QTDesigner can be used to cross-compile QTApplications, deploy and debug directly on the target platform.
The used platform is the NXP i.MX8M Mini based Trizeps VIII Mini or Myon II.
Build Yocto Image an SDK
First, you have to build a Yocto Image with QT and sftp-server (needed by QTDesigner to deploy applications).
You need to build the project fsl-image-qt5-validation-imx, but before you have to add the sftp feature.
Create project:
DISTRO=fsl-imx-wayland MACHINE=imx8mm_trizeps8mini source fsl-setup-release.sh -b build-wayland
After creating the project folder please edit the conf/local.conf:
EXTRA_IMAGE_FEATURES ?= "debug-tweaks openssh-sftp-server"
Now you can start the Image compilation with bitbake:
bitbake fsl-image-qt5-validation-imx
The first build process depending on the build machine takes a long time.
When the process finish you can also build the SDK you will need:
You will find the image at <build-dir>/tmp/deploy/images and the
SDK at <build-dir>/tmp/deploy/sdk/<image-name>-<host-arch>-<distro-version>-toolchain.sh
Deploy Image
The detailed deploy process you can find here: deploy_image After first boot you have to change the /etc/ssh/sshd_config. Please modify the following line and restart service or device:
Install SDK
You can easily install the SDK with root permissions:
Also you can find a prebuilt SDK: Software-Development-Kit
Install QTCreator
On Ubuntu or similar you can install the QTCreator with the packet manager (This application note is based on 18.04.1-Ubuntu) :
Configure QTCreator
Setup a device for ssh connection and sftp download
You can use the wizard and the the device.
Add the cross-compiler
Add cross-compiler:
Add GDP debugger:
Add QMake:
Add Kit:
Create Sample Project
create a new project using the „Qt Widgets Application“ template
use the just created „Yocto Cross-compile x86 64bit“ Kit
add the deploy settings to *.pro file
How to Build Applikations with QTCreator and Yocto SDK for Debian 10
To use the configuration for Debian 10 (buster) DEBIAN 10 (buster) you have also follow the next steps:
Install Debian 10
Follow the steps to install Debian DEBIAN 10 (buster).
Install QT5
Add qt5 to Debian
Modify Project
Modify the configuration of QTCreator. Projects→Run→Run Environment
To Run and Build you have to change the settings in *.pro