Building a Qt applications for i.MX6Q

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

Building a Qt applications for i.MX6Q

Jump to solution
5,207 Views
brianhuang
Contributor II

I want to build a simple Qt hello world application for i.MX6Q.

I follow the below setps.

1.MACHINE=imx6qsabresd source fsl-setup-release.sh -b imx6qsabresd_x11_qt5 -e x11

2.bitbake meta-toolchain-qt5. And I got a shellscript

~/work/build/tmp/deploy/sdk/poky-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.7.sh

 

3.sh  ~/work/build/tmp/deploy/sdk/poky-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.7.sh

4.Install qtcreator  and  edit the /home/brian/Qt5.5.0/Tools/QtCreator/bin/qtcreator.sh,add "source /opt/poky/1.7/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi"

 

source /opt/poky/1.7/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi

#! /bin/sh

 

makeAbsolute() {

    case $1 in

        /*)

            # already absolute, return it

            echo "$1"

            ;;

        *)

            # relative, prepend $2 made absolute

            echo `makeAbsolute "$2" "$PWD"`/"$1" | sed 's,/\.$,,'

            ;;

    esac

}

 

5.

In QtCreator I set

 

Compiler as

             /opt/poky/1.7/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++

              76765_76765.pngScreenshot from 2015-09-17 20_23_40.png

 

Qt version as

                 /opt/poky/1.7/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake

             76766_76766.pngScreenshot from 2015-09-17 20_24_10.png

sysroot as

                     /opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi

            76767_76767.pngScreenshot from 2015-09-17 20_25_04.png

and then I build a new project and add some to the .pro file

    

76768_76768.pngScreenshot from 2015-09-17 20_42_16.png

When I use "build all", I got a compile error as attached file " errorlog"

Do I miss somthing?

Original Attachment has been moved to: errorlog.zip

Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
3,223 Views
LuisCasado
NXP Employee
NXP Employee

Hello,

I configure the KIT :

image002.jpg

And I select the KIT when I create the project:

image004.jpg

The other configuration I have is the same as you.

Luis

View solution in original post

12 Replies
3,224 Views
LuisCasado
NXP Employee
NXP Employee

Hello,

I configure the KIT :

image002.jpg

And I select the KIT when I create the project:

image004.jpg

The other configuration I have is the same as you.

Luis

3,223 Views
brianhuang
Contributor II

Hi Luis Casado

Thanks for your help.

I follow your setting. The build is OK.

But I got another error ,when I use "Run" or "Deploy All" .

Screenshot from 2015-09-18 11_27_42.png

My Device setting as

Screenshot from 2015-09-18 11_26_53.png

My question is

Could I deploy an qt output file on my PC and copy this file to SD  and excute like as "./qtoutputfile " on my i.MX6Q-sabresd board?

Thank you.

0 Kudos
Reply
3,223 Views
isaac_ng
NXP Employee
NXP Employee

It seems using openssh instead of dropbear could get it to work.

Test on L3.14.28_1.0.0-GA release and this is my local.conf:

MACHINE ??= 'imx6qsabresd'

DISTRO ?= 'poky'

PACKAGE_CLASSES ?= "package_rpm"

EXTRA_IMAGE_FEATURES = "debug-tweaks ssh-server-openssh tools-debug eclipse-debug"

USER_CLASSES ?= "buildstats image-mklibs image-prelink"

PATCHRESOLVE = "noop"

BB_DISKMON_DIRS = "\

    STOPTASKS,${TMPDIR},1G,100K \

    STOPTASKS,${DL_DIR},1G,100K \

    STOPTASKS,${SSTATE_DIR},1G,100K \

    ABORT,${TMPDIR},100M,1K \

    ABORT,${DL_DIR},100M,1K \

    ABORT,${SSTATE_DIR},100M,1K"

PACKAGECONFIG_append_pn-qemu-native = " sdl"

PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"

ASSUME_PROVIDED += "libsdl-native"

CONF_VERSION = "1"

BB_NUMBER_THREADS = '8'

PARALLEL_MAKE = '-j 8'

DL_DIR ?= "${BSPDIR}/downloads/"

ACCEPT_FSL_EULA = ""@

CORE_IMAGE_EXTRA_INSTALL += "kernel-dev"

IMAGE_INSTALL_append += "openssh-sftp-server openssh-sftp"

3,223 Views
brianhuang
Contributor II

Hi

Could I deploy an qt application output file on my PC and copy this file to SD  and excute like as "./qtoutputfile " on my i.MX6Q-sabresd board?

Thank you.

0 Kudos
Reply
3,223 Views
isaac_ng
NXP Employee
NXP Employee

It is supposing you are connecting the i.MX6 device board and the PC in the network and then you could download the qt application to run on i.MX6 device board via qtcreator. Is it what you want to achieve?

0 Kudos
Reply
3,223 Views
brianhuang
Contributor II

Hi Heifatisaac Ng ,

Thanks for your help!

0 Kudos
Reply
3,223 Views
brianhuang
Contributor II

Hi All,

Thanks for your explanation. I understand the meaning of this setting.

I don't use network. Because My mockup doesn't have network.

I try the below steps ,but fail.

1.After I built my project, I got  this file "Test09171950"

Screenshot from 2015-09-18 17_11_34.png

2.I copy this file "Test09171950" to the root file system in my SD Card

Screenshot from 2015-09-18 17_18_23.png

3.I excute this qtapplication by command line. but I got error.

111.jpg

How can I fix this problem?

Thank you.

0 Kudos
Reply
3,223 Views
LuisCasado
NXP Employee
NXP Employee

Hello,

Try :

$export DISPLAY=:0

Luis

3,223 Views
brianhuang
Contributor II

Hi Luis Casado,

Thanks for your help.It's OK.

Is the setting  "$export DISPLAY=:0 " necessary for Qt application?

0 Kudos
Reply
3,223 Views
LuisCasado
NXP Employee
NXP Employee

Hello,

No for QT, but for X11 backend.

The DISPLAY variable is not used by X itself.  It tells X11 applications which screen they should run on. The reason this variable is needed is because you can have multiple X servers running locally, or you may wish to use a remote display. So if the DISPLAY variable is not set, your X11 apps have no idea where you want them to run.

Luis

3,223 Views
brianhuang
Contributor II

Hi Luis Casado ,

Thanks for your help!

0 Kudos
Reply
3,223 Views
LuisCasado
NXP Employee
NXP Employee

Hello,

I have this configuration on the QT creator for debugger and device:

image011.jpg

image012.jpg

image013.jpg

image014.jpg image015.jpg

In my conf/local.conf

I have:

EXTRA_IMAGE_FEATURES = "debug-tweaks tools-debug eclipse-debug ssh-server-openssh"

CORE_IMAGE_EXTRA_INSTALL += "openssh-sftp openssh-sftp-server"

And also don't forget add to your *.pro file

target.path = /home/root

INSTALLS += target


Luis