QTCreator together with SABRE Board for the i.mx 6SoloX

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

QTCreator together with SABRE Board for the i.mx 6SoloX

Jump to solution
2,697 Views
christophbismar
Contributor II

Hello everybody,

I'm currently trying to set up QTCreator in Order to work with my SABRE Board for the i.mx 6Solox. I've managed to get QTCreator to communicate with the board (after setting the IP-Adress up, you can Test the connection and that seemed to work), however, I cannot deploy a program (one of the examples.

Does anybody else here work with this combination and has a tip for me how to do that? I suppose I would have to create a new core-image that includes QT5 and the other capabilities I need (USB-host Stack and the likes)?

Right now, the demo image is running on this board: Poky (Yocto Project Reference Distro) 1.6.2.

Any help would be greatly appreciated since I'm pretty new to this topic.

Regards,

Christoph

Labels (4)
Tags (3)
0 Kudos
Reply
1 Solution
1,303 Views
christophbismar
Contributor II

Hello Luis,

thank you very much for your quick reply. I'm having trouble bitbaking the layer "fsl-image-qt5", bitbake says "Nothing PROVIDES 'fsl-image-qt5'". How can I obtain a local copy of this layer? Do I even need to do that?

Sorry for all these noobish questions.

Regards,

Christoph

EDIT: With the help of this tutorial: Communication between asymmetric cores on i.MX6SoloX I've been able to setup my Ubuntu correctly and am now compiling fsl-image-qt5. Let's see where this leads.

EDIT2: For all the people facing the same problem as I was: Install and setup your SDK like in the linked tutorial. After that go to /usr/bin/ and use "sudo gedit qtcreator.sh" There you need to paste after "export LD_LIBRARY_PATH":

export SDKTARGETSYSROOT=/opt/poky/1.6.2/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi

export PATH=/opt/poky/1.6.2/sysroots/x86_64-pokysdk-linux/usr/bin:/opt/poky/1.6.2/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi:$PATH

export PKG_CONFIG_SYSROOT_DIR=$SDKTARGETSYSROOT

export PKG_CONFIG_PATH=$SDKTARGETSYSROOT/usr/lib/pkgconfig

export CONFIG_SITE=/opt/poky/1.6.2/site-config-cortexa9hf-vfp-neon-poky-linux-gnueabi

export OECORE_NATIVE_SYSROOT="/opt/poky/1.6.2/sysroots/x86_64-pokysdk-linux"

export OECORE_TARGET_SYSROOT="$SDKTARGETSYSROOT"

export OECORE_ACLOCAL_OPTS="-I /opt/poky/1.6.2/sysroots/x86_64-pokysdk-linux/usr/share/aclocal"

export PYTHONHOME=/opt/poky/1.6.2/sysroots/x86_64-pokysdk-linux/usr

export CC="arm-poky-linux-gnueabi-gcc"

export CXX="arm-poky-linux-gnueabi-g++"

export CPP="arm-poky-linux-gnueabi-gcc"

export AS="arm-poky-linux-gnueabi-as "

export LD="arm-poky-linux-gnueabi-ld  --sysroot=$SDKTARGETSYSROOT"

export GDB=arm-poky-linux-gnueabi-gdb

export STRIP=arm-poky-linux-gnueabi-strip

export RANLIB=arm-poky-linux-gnueabi-ranlib

export OBJCOPY=arm-poky-linux-gnueabi-objcopy

export OBJDUMP=arm-poky-linux-gnueabi-objdump

export AR=arm-poky-linux-gnueabi-ar

export NM=arm-poky-linux-gnueabi-nm

export M4=m4

export TARGET_PREFIX=arm-poky-linux-gnueabi-

export CONFIGURE_FLAGS="--target=arm-poky-linux-gnueabi --host=arm-poky-linux-gnueabi --build=x86_64-linux --with-libtool-sysroot=$SDKTARGETSYSROOT"

export CFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types"

export CXXFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types"

export LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed"

export CPPFLAGS=""

export OECORE_DISTRO_VERSION="1.6.2"

export OECORE_SDK_VERSION="1.6.2"

export ARCH=arm

export CROSS_COMPILE=arm-poky-linux-gnueabi-

export PATH=/opt/poky/1.6.2/sysroots/x86_64-pokysdk-linux/usr/bin/qt5:$PATH

export OE_QMAKE_CFLAGS="$CFLAGS"

export OE_QMAKE_CXXFLAGS="$CXXFLAGS"

export OE_QMAKE_LDFLAGS="$LDFLAGS"

export OE_QMAKE_CC=$CC

export OE_QMAKE_CXX=$CXX

export OE_QMAKE_LINK=$CXX

export OE_QMAKE_AR=$AR

export OE_QMAKE_LIBDIR_QT=/opt/poky/1.6.2/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib

export OE_QMAKE_INCDIR_QT=/opt/poky/1.6.2/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5

export OE_QMAKE_MOC=/opt/poky/1.6.2/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/moc

export OE_QMAKE_UIC=/opt/poky/1.6.2/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/uic

export OE_QMAKE_RCC=/opt/poky/1.6.2/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/rcc

export OE_QMAKE_QDBUSCPP2XML=/opt/poky/1.6.2/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qdbuscpp2xml

export OE_QMAKE_QDBUSXML2CPP=/opt/poky/1.6.2/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qdbusxml2cpp

export OE_QMAKE_QT_CONFIG=/opt/poky/1.6.2/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib/qt5/mkspecs/qconfig.pri

export QMAKESPEC=/opt/poky/1.6.2/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib/qt5/mkspecs/linux-oe-g++

export QT_CONF_PATH=/opt/poky/1.6.2/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qt.conf

To run QTCreator, you then have to type: "sudo sh qtcreator.sh". The Super User rights are needed for correct compiling, why is beyond me. Otherwise QTCreator would always throw the error in the likes that "c is an unknown command" because he tries to use a parameter as a command.

I used up a good 6 hours to find this out, I hope, somebody reads this and can solve their problem a little bit quicker.

The SDK was installed in the standard directory, don't know if this is actually needed or not, but I tried this in the process of trying to get it all to work aswell and haven't tried using another SDK location but with QT sudo-mode.

Anyway, have fun with this solution.

Regards,

Christoph

View solution in original post

0 Kudos
Reply
4 Replies
1,303 Views
LuisCasado
NXP Employee
NXP Employee

Hello,

If you use the latest BSP for the i.MX6SX:

http://www.freescale.com/webapp/Download?colCode=L3.10.53_1.1.0_LINUX_DOCS&Parent_nodeId=13376994810...

Edit conf/local.conf and add:

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

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

Follow the user guide to build "fsl-image-qt5”. Then , create and install the SDK "bitbake meta-toolchain-qt5”.

Then, you can configure the toolchain and the target device for debugging.

Check this doc:

http://ftp1.digi.com/support/documentation/APN%20-%20Yocto%20QT%20Application%20Development_20140925...

Luis

1,304 Views
christophbismar
Contributor II

Hello Luis,

thank you very much for your quick reply. I'm having trouble bitbaking the layer "fsl-image-qt5", bitbake says "Nothing PROVIDES 'fsl-image-qt5'". How can I obtain a local copy of this layer? Do I even need to do that?

Sorry for all these noobish questions.

Regards,

Christoph

EDIT: With the help of this tutorial: Communication between asymmetric cores on i.MX6SoloX I've been able to setup my Ubuntu correctly and am now compiling fsl-image-qt5. Let's see where this leads.

EDIT2: For all the people facing the same problem as I was: Install and setup your SDK like in the linked tutorial. After that go to /usr/bin/ and use "sudo gedit qtcreator.sh" There you need to paste after "export LD_LIBRARY_PATH":

export SDKTARGETSYSROOT=/opt/poky/1.6.2/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi

export PATH=/opt/poky/1.6.2/sysroots/x86_64-pokysdk-linux/usr/bin:/opt/poky/1.6.2/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi:$PATH

export PKG_CONFIG_SYSROOT_DIR=$SDKTARGETSYSROOT

export PKG_CONFIG_PATH=$SDKTARGETSYSROOT/usr/lib/pkgconfig

export CONFIG_SITE=/opt/poky/1.6.2/site-config-cortexa9hf-vfp-neon-poky-linux-gnueabi

export OECORE_NATIVE_SYSROOT="/opt/poky/1.6.2/sysroots/x86_64-pokysdk-linux"

export OECORE_TARGET_SYSROOT="$SDKTARGETSYSROOT"

export OECORE_ACLOCAL_OPTS="-I /opt/poky/1.6.2/sysroots/x86_64-pokysdk-linux/usr/share/aclocal"

export PYTHONHOME=/opt/poky/1.6.2/sysroots/x86_64-pokysdk-linux/usr

export CC="arm-poky-linux-gnueabi-gcc"

export CXX="arm-poky-linux-gnueabi-g++"

export CPP="arm-poky-linux-gnueabi-gcc"

export AS="arm-poky-linux-gnueabi-as "

export LD="arm-poky-linux-gnueabi-ld  --sysroot=$SDKTARGETSYSROOT"

export GDB=arm-poky-linux-gnueabi-gdb

export STRIP=arm-poky-linux-gnueabi-strip

export RANLIB=arm-poky-linux-gnueabi-ranlib

export OBJCOPY=arm-poky-linux-gnueabi-objcopy

export OBJDUMP=arm-poky-linux-gnueabi-objdump

export AR=arm-poky-linux-gnueabi-ar

export NM=arm-poky-linux-gnueabi-nm

export M4=m4

export TARGET_PREFIX=arm-poky-linux-gnueabi-

export CONFIGURE_FLAGS="--target=arm-poky-linux-gnueabi --host=arm-poky-linux-gnueabi --build=x86_64-linux --with-libtool-sysroot=$SDKTARGETSYSROOT"

export CFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types"

export CXXFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types"

export LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed"

export CPPFLAGS=""

export OECORE_DISTRO_VERSION="1.6.2"

export OECORE_SDK_VERSION="1.6.2"

export ARCH=arm

export CROSS_COMPILE=arm-poky-linux-gnueabi-

export PATH=/opt/poky/1.6.2/sysroots/x86_64-pokysdk-linux/usr/bin/qt5:$PATH

export OE_QMAKE_CFLAGS="$CFLAGS"

export OE_QMAKE_CXXFLAGS="$CXXFLAGS"

export OE_QMAKE_LDFLAGS="$LDFLAGS"

export OE_QMAKE_CC=$CC

export OE_QMAKE_CXX=$CXX

export OE_QMAKE_LINK=$CXX

export OE_QMAKE_AR=$AR

export OE_QMAKE_LIBDIR_QT=/opt/poky/1.6.2/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib

export OE_QMAKE_INCDIR_QT=/opt/poky/1.6.2/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5

export OE_QMAKE_MOC=/opt/poky/1.6.2/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/moc

export OE_QMAKE_UIC=/opt/poky/1.6.2/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/uic

export OE_QMAKE_RCC=/opt/poky/1.6.2/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/rcc

export OE_QMAKE_QDBUSCPP2XML=/opt/poky/1.6.2/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qdbuscpp2xml

export OE_QMAKE_QDBUSXML2CPP=/opt/poky/1.6.2/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qdbusxml2cpp

export OE_QMAKE_QT_CONFIG=/opt/poky/1.6.2/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib/qt5/mkspecs/qconfig.pri

export QMAKESPEC=/opt/poky/1.6.2/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib/qt5/mkspecs/linux-oe-g++

export QT_CONF_PATH=/opt/poky/1.6.2/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qt.conf

To run QTCreator, you then have to type: "sudo sh qtcreator.sh". The Super User rights are needed for correct compiling, why is beyond me. Otherwise QTCreator would always throw the error in the likes that "c is an unknown command" because he tries to use a parameter as a command.

I used up a good 6 hours to find this out, I hope, somebody reads this and can solve their problem a little bit quicker.

The SDK was installed in the standard directory, don't know if this is actually needed or not, but I tried this in the process of trying to get it all to work aswell and haven't tried using another SDK location but with QT sudo-mode.

Anyway, have fun with this solution.

Regards,

Christoph

0 Kudos
Reply
1,303 Views
LuisCasado
NXP Employee
NXP Employee

Hi Christoph,

If you add :

source /opt/poky/1.xxxx/environment-setup-armv7a-vfp-neon-poky-linux-gnueabi

in the qtcreator.sh , you don't need add the lines you added and you don't need execute with sudo as is explained here:

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

Luis

0 Kudos
Reply
1,303 Views
christophbismar
Contributor II

Hello Luis,

I tried your way and it did not work. I always get permission denied error, if I don't run with sudo. If I run your version (with the one line) as sudo I get a compile-error again.

I'll just stick with the ugly big qtcreator.sh that works.

Thanks anyway.

Regards,

Christoph

0 Kudos
Reply