epteck logo white
Cross Compile QT for IMX Boards

Cross Compile QT for IMX Boards: Toolchain Setup in 5 Steps

Setting a cross compile QT for IMX boards (Arm64) is a hectic task. Many developers face difficulty in setting environment for QT5 application development for embedded products like imx. 

Thanks to freescale imx who offers meta-toolchain-QT5. This toolchain makes cross compile QT for IMX boards easier. In this tutorial, we will guide you how to setup meta-toolchain-QT5 for your imx boards in 5 simple steps.

After completing this tutorial, you will be able to rapidly build and deploy QT5 application for you freescale boards. So, lets get started now!

Pre-Requisites:

To install this toolchain, you must have setup Yocto environment for your freescale imx board. Almost every imx project have its yocto build. If your project doesn’t have yocto build, you can make it now following this tutorial.

Steps to Cross Compile QT for IMX Boards:

STEP 1:

Configure your yocto project according to your board and distro using the below commands.

Cd  /path/to/your/yocto/project
machine=your-board-name Distro=fsl-imx-wayland . setup-release.sh

STEP 2: 

Comment the 2 lines in build/local.conf. You can open this file with your favourite editor like vi, nano or whatever.

nano /path-to-your-yocto-project-project/build/conf/local.conf

Cross Compile QT for IMX Boards - Step 2.1

Comment these two lines as shown in the screenshot below.

Cross Compile QT for IMX Boards - Step 2.2

STEP 3:

Build the toolchain SDK using the below command

bitbake meta-toolchain-qt5

Build the toolchain SDK

STEP 4:

Install the SDK in your host machine.

Cd /path-to-your-yocto-project/build/tmp/deploy/sdk
./fsl-imx-xwayland-glibc-x86_64-meta-toolchain-qt5-cortexa35-imx8qxpc0mek-toolchain-5.10-gatesgarth.sh

The shell script name might be little different depending on your yocto project. 

Install the SDK in your host machine.

Press Y at every step while installation

You will see the below logs after QT cross compile toolchain installation.

Setting it up…done

SDK has been successfully set up and is ready to be used.

Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g . 

. /home/akkaadmin/build/imx8/build/tmp/deploy/sdk/y/environment-setup-cortexa35-poky-linux

STEP 5:

Simply paste the last line in step 4 any terminal session to compile QT.  After completing this step, you can compile any QT application for imx boards.

. /opt/fsl-imx-xwayland/4.14-gatesgart/environment-setup-aarch64-poky-linux

Get in touch with us Today!