Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

Version 1 Next »

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).
The process to install yocto and create an image you can find here (Yocto, Trizeps VIII, Trizeps VIII Mini).
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:

bitbake -c populate_sdk fsl-image-qt5-validation-imx

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:

#Subsystem sftp /usr/libexec/sftp-server
Subsystem sftp internal-sftp

Install SDK

You can easily install the SDK with root permissions:

./<image-name>-<host-arch>-<distro-version>-toolchain.sh 

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) :

sudo apt-get install qtcreator

Configure QTCreator

  1. Setup a device for ssh connection and sftp download

You can use the wizard and the the device.

  1. Add the cross-compiler

Add cross-compiler:

C++
path: /opt/fsl-imx-wayland/4.14-sumo/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++
ABI: arm-Linux-gernic-elf-64bit
C
path: /opt/fsl-imx-wayland/4.14-sumo/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc
ABI: arm-Linux-gernic-elf-64bit
  1. Add GDP debugger:

path: /opt/fsl-imx-wayland/4.14-sumo/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gdb
  1. Add QMake:

location: /opt/fsl-imx-wayland/4.14-sumo/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake
  1. Add Kit:

Device type: Generic Linux Device
Device: The created device from step 1
Sysroot:  /opt/fsl-imx-wayland/4.14-sumo/sysroots/x86_64-pokysdk-linux
Compiler:
C: Compiler from step 2 
C++: Compiler from step 2
Debugger: Debugger from step 3
QT Version: QT 5.10.1 (qt5)

Create Sample Project

  1. create a new project using the „Qt Widgets Application“ template

  2. use the just created „Yocto Cross-compile x86 64bit“ Kit

  3. add the deploy settings to *.pro file

target.path=/home/root
INSTALLS += target

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:

  1. Install Debian 10

Follow the steps to install Debian DEBIAN 10 (buster).

  1. Install QT5

Add qt5 to Debian

sudo apt install qt5-default gdbserver
  1. Modify Project

Modify the configuration of QTCreator. Projects→Run→Run Environment

Use System Environment and
Set DISPLAY to :0

To Run and Build you have to change the settings in *.pro

target.path=/home/imx6

  • No labels