Toolchain with QT Creator

Requirements

For creating the QT5 toolchain a complete Yocto build environment is required.

Depending on your module choose the correct guide - if not already set up.

Note

QSXP, QSXM, QS8M, TX8M use NXP Yocto Zeus Guide

Note

QSMP, TXMP, TX6, TXUL use Mainline Yocto Zeus Guide

Building SDK

  1. Setup the Yocto build-directory as described in the Yocto guide for your machine. Use the following values:
  • DISTRO=karo-wayland
  • MACHINE=<desired-machine>
  1. Build the image for your target:
bitbake karo-image-qt5
  1. Program your board using our manufacturing tools. You can also boot the image from net/tftp.

Note

QSXP, QSXM, QS8M, TX8M use UUU - Universal Update Utility

Note

QSMP, TXMP use STM32CubeProgrammer

Note

TX6, TXUL use MFG-Tool

  1. Populate the corresponding SDK:
bitbake karo-image-qt5 -c populate_sdk

Installing SDK

To install the previously built SDK on your host, simply run:

<your-build-directory>/tmp/deploy/sdk/<sdk-architechture-depending-install-script-name>.sh

Hint

It is recommended to install every toolchain into a seperate folder inside /opt/

Installing QT Creator

Download the QT Creator offline installation for Linux from https://www.qt.io/offline-installers and execute the .run file. This will install the QT Creator for you.

Setup QT Creator

Now we have to tell QtCreator to use our previously installed SDK.

SDK

Start QT Creator, go to Tools ‣ Options and select the Kits section.

Configure QMake, Compilers, Debuggers, and CMake as shown in the following screenshots. Of course you have to fit the paths depending on your SDK.

../../_images/qt-versions.png

QT Versions

../../_images/compilers-1.png

C Compilers

../../_images/compilers-2.png

C++ Compilers

../../_images/debuggers.png

Debuggers

../../_images/cmake.png

CMake

Device

Note

For the next steps it is required that your target has a working ethernet connection to your host.

Go to section Devices and choose Add ‣ Generic Linux Device ‣ Start Wizard. Follow the steps to configure your target.

To find out the IP of our target, run ifconfig -a on it.

../../_images/devices.png

Devices

Now - in Kits section again - setup the Kit itself with the previously configured parameters.

../../_images/kits.png

Complete Kits

Press Apply and close the Options Window.

Hello World

Create a new project using the project wizard on QTCreators start screen clicking + New.

Select e.g. “Qt Quick Application - Scroll” and go through the steps. Make sure you select the right Kit.

Once created you should be able to run project on your target.

../../_images/run.png

Run