Setting up Qt Creator to build for i.MX6

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Setting up Qt Creator to build for i.MX6

Setting up Qt Creator to build for i.MX6

This documents describes the neceesary steps to set up Qt Creator with the Qt5 toolchain that is available as part of the 3.14.28 BSP Release.

Requirements

1) Linux machine. Ubuntu 12.4 or higher is recommended.

2) Yocto Freescale BSP Release L3.14.28 or higher.

For this example we'll use the Freescale BSP Release L3.14.28 but you may use future BSP releases that include the Qt toolchain.

- Freescale BSP Release Documentation L3.14.28 (login required)

https://www.freescale.com/webapp/Download?colCode=L3.14.28_1.0.0_LINUX_DOCS&location=null&fpsp=1&WT_...

3) Qt5 Meta Toolchain (Poky 1.7 qt5 / L3.14.28 for our example but you may use the qt toolchain that corresponds to the BSP that will be used)

For information on how to extract and install the meta toolchain please follow the steps on the next document but with the following command:

$ bitbake meta-toolchain-qt5

https://community.freescale.com/docs/DOC-95122

Task #7 - Create the toolchain

Then run the script.

fsl-release-bsp/<BUILD_DIR>/tmp/deploy/sdk/poky-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.7.sh

Installing Qt Creator

We will use the Open Source version of Qt Creator. Please make sure that your application does comply with the requirements of Open Source Software before installing.

You may download Qt Creator Open Source for Linux from the following link:

http://www.qt.io/download-open-source/

Once you downloaded the installer you will need to make sure that the file has permission to be executed. You can add this with the following command:

$ chmod +x qt-unified-linux-x64-2.0.2-2-online.run

Then run the installer

$ ./ qt-unified-linux-x64-2.0.2-2-online.run

01_Qt_Splash.png

After the information from the repositories has been fetched you will be asked where to install Qt Creator.

05_qt_path.png

Then you will be asked which components to install. We will install Qt 5.4 which is the one supported on the 3.14.28 BSP release.

06_Qt_Setup-Components.png

You will need to accept the License Agreement and then the installer will fetch and install the necessary files.

09_qt_downloading.png

Configuring Qt Creator

Once it’s finished downloading, launch Qt Creator. You can do this with the following command:

cd <INSTALATION_DIR>/Tools/QtCreator/bin

$./qtcreator.sh

Under the Tools top bar menu, chose Options…

10_qt_Tools_Options.png

On the Options window’s left menu chose Build & Run and then the Compilers tab and select Add GCC.

11_qt_Build&Run.png

On the next screen chose a name for this Compiler (i.e. i.MX Qt5) and then select the Compiler path, which may vary depending on where you have it installed but by default should be in:

/opt/poky/<VERSION>/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++

12_Compiler_add.png

It should then be detected as arm-linux on the ABI section.

Next select the Qt Versions tab and click on Add… Look for the qmake on the toolchain path, which is by default:

/opt/poky/<VERSION>/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake

12_qt_QT_version_add.png

Finally, on the Kits tab add a new kit and select the sysroots from the toolchain, which is by default located in:

/opt/poky/<VERSION>/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi

14_Qt_Kits.png

Qt Creator is now configured for building for the i.MX6.

Comments

Dear Yuri ,

We have followed the steps  as per the above mentioned steps

Could not start Process

Error while building /Deploying projects when executing step make

Note:

In build &Run -> Qt versions : /opt/poky/1.6.2/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake

at the time we get a notification like no compiler can produce code for this qt version.

could you please help me, to solve this issue

gusarambula

Please help Sachu Sanal,  if possible.

~Yuri.

please help me,...

I am using IMX6qsabresd board with yocto daisy build  image .

Please help me its an urgent task

Hello Sachu Sanal,

I would recommend double checking that you are using the qt5 toolchain. You may extract this toolchain using the meta-toolchain-qt5 recipe.

Other than that I did not see anything that may be incorrect but I would like to double check if you disabled all other Kits except for the one you created for Qt5 on the Kit Selection screen when creating the new project.

Hai Gusarambula,

Thanks for your reply .

I am using qt5 toolchain ,I bitbaked meta-toolcain -qt5.

Through this bitbake process generate on sh file on build/tmp/deploy/sdk/poky-eglibc-x86_64-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.6.3.sh.

Run that script an install the  toochain and sysroot on/opt/poky directory.

Disable all other kits include native kit also and only select my cross compiler kit.

Get an error like failed to upload file /home/sachu/buid-example-debud/Example1 " could not open for reading.

Please help me to solve this issue.

Awaiting your favourable reply

hey.. I am getting an error like below while running bitbake meta-toolchain-qt5

ERROR: Nothing PROVIDES 'meta-toolchain-qt5'. Close matches:

  meta-toolchain-qt

  meta-toolchain-qte

  meta-toolchain

I was using jethro branch of fsl-community-bsp-platform

(repo init -u https://github.com/Freescale/fsl-community-bsp-platform -b jethro)

What could be the reason?

Thanks,

Shyam

Hi shyamjithkv​,

3.14.52 kernel have qt5 so you run the below command you will get QT5.

=> bitbake meta-toolchain-qt

Regards,

Aravinth

Hi gusarambula

After installed the qtcreator, when I want to start it, the following error was output.

------------------

This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, xcb.

Reinstalling the application may fix this problem.

------------------

Could you give me some advice?

Thank you!

ZongbiaoLiao

Hi Zongbiao,

How you are running the application.?

Regards,

Aravinth

Hi Aravinth

I tried to start qtcreator by running ./qtcreator.sh.

Thank you!

ZongbiaoLiao

Hi gusarambula,

I run the command bitbake fsl-image-qt5 -c populate_sdk, but without qmake.

yocto version: "L4.1.15-2.0.1"

Your qtcreator is running on Ubuntu? Or you met the issue when running your target application?

Hi Eric,

I get the same error message as ZongbiaoLiao had:

------------------

This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, xcb.

Reinstalling the application may fix this problem.

------------------

I  can start the example "clocks" from the Host (ubuntu 14.04) and see the "clocks" running on iMX6UL EVK.

This show me that the example application "clocks" is deployed on the device correctly.

But as I start  my own small application (one list and one button) from the Host, on the iMX6UL EVK I can see nothing

except the application binary. On the Host output window I then see the error message mentioned above !!! (with example

"clocks" I didn't see such error messages)

What could be the reason ??

anton

Start the application by -platform wayland

Hi Eric,

yes, this platform setting was done, but somehow it is now missing. Add this settings it works fine.

Thank you very much!

Regards

Xi

100% helpful (1/1)
Version history
Last update:
‎10-12-2015 03:11 PM
Updated by: