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//

2,325 Views
sywksmstkadlfgk
Contributor III

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

86574_86574.png01_Qt_Splash.png

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

86575_86575.png05_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.

86693_86693.png06_Qt_Setup-Components.png

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

86694_86694.png09_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…

86695_86695.png10_qt_Tools_Options.png

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

86696_86696.png11_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++

86697_86697.png12_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

86698_86698.png12_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

86699_86699.png14_Qt_Kits.png

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

Labels (1)
0 Kudos
Reply
0 Replies