Any Articles about a Basic QT Embedded Linux project in Toradex

Hi,
I have set up QT, based on the instructions on this page.

I am trying to make a simple form in Qt creator and deploy in Target. But I was not able to find a article in Toradex for this like a "Hello world QT project:
When I start a Project QT shows different type of projects and I tried one by one, but my build process is not getting through. Something totally messed up . around 200 error messages.
Is there Any article for my purpose available here.?
Thanks
I am attaching my screen shots here
[upload|JyT04M2dTYmfm4qQwKW2vUojphM=]

[upload|nK6HvLoMwJg2Fyyl4icvbITNo00=]

[upload|qgCJCmawQ0t5ZF1qax4E4L2w8tM=]

[upload|herukNjaIb+uJQPtg7K7rkD2bUA=]

[upload|a2lf9BjZfH1hyitoRmtBigczlgk=]

btw I have successfully compiled, downloaded and debugged a simple console based Hello world application mentioned in toradex pages.
using linaro tool chain, toradex provided image and eclipse IDE.
So the communication link seems to be ok and in QT also I can test the kit and connection is OK.
Host ubuntu 16.04LTS 64 bit

what is not working then? Can you send a log of error messages?

Here is the log file attached.
Also when we create our QT project, which type of project we need to use.
Attached log

Based on attached images you are probably missing Qt mkspec definition.

At the bottom of this article there is a note saying:

Note: With Qt 5.7 from OpenEmbedded Morty release (BSP version 2.7 Beta1 and later) require Qt mkspec to be set as follows

/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/lib/qt5/mkspecs/linux-oe-g++

I have added the corresponding file in my installation.
My path is

/usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/lib/qt5/mkspecs/linux-oe-g++/qmake.conf

The main error now I am receiving is

/usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/include/qt5/QtCore/qcompilerdetection.h:562:6: error: #error Qt requires a C++11 compiler and yours does not seem to be that.
 #    error Qt requires a C++11 compiler and yours does not seem to be that.

What do you mean by I have added the corresponding file? That file is added when you install Qt sdk.
What version of ubuntu are you using? 32 or 64 bit?

The page says this

/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/lib/qt5/mkspecs/linux-oe-g++

But in my case there is a slight path name difference because of version difference
my path is this

/usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/lib/qt5/mkspecs/linux-oe-g++

That was what I meant by corresponding file

My ubuntu is 16.04 LTS 64 bit
Thanks

You need to run Qt creator within the context of the sourced script (/usr/local/oecore-x86_64/environment-setup-armv7at2hf-neon-angstrom-linux-gnueabi).
How do you start the qt creator?

yes .I will run the script from terminal and start qt from terminal itself.
btw
why it is asking for C++11 support?

you need c+11 compiler to compile QT.

how to install and connect that in our toolchain?

It’s already a part of the SDK. For qt5 with proper mkspec and environmental variable set it should be used automatically. Something is mis-configured on your system and that’s why qt is using your system g++ instead of the one in the SDK

In the choose project screen of QT what is the type we need to select?

I got the build Process pass through, not sure weather it is correct or not.
Here is the present kit setup

[upload|amR4xuxJ2R+R9JYwLkuAsO7Y518=]

But the kit shows a Red Astrix sign, which reads like this

[upload|2AniYbRnzAIhmzZt0uuCaJLiSE0=]

But the build process pass through wuith the follwing compiler output

15:17:58: Running steps for project QT_Project1...
15:17:58: Starting: "/usr/bin/make" clean
rm -f moc_mainwindow.cpp
rm -f ui_mainwindow.h
rm -f main.o mainwindow.o moc_mainwindow.o
rm -f *~ core *.core
15:17:58: The process "/usr/bin/make" exited normally.
15:17:58: Starting: "/usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/bin/qt5/qmake" /home/ub_serpent_host/QT_Projects/QT_Project1/QT_Project1.pro -r -spec /usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/lib/qt5/mkspecs/linux-oe-g++ CONFIG+=debug
15:17:58: The process "/usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/bin/qt5/qmake" exited normally.
15:17:58: Starting: "/usr/bin/make" 
/usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/bin/qt5/uic ../QT_Project1/mainwindow.ui -o ui_mainwindow.h
arm-angstrom-linux-gnueabi-g++  -mfpu=vfpv3-d16 -march=armv7-a -mthumb -mfpu=vfp  -mfloat-abi=hard --sysroot=/usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi -c -pipe  -O2 -pipe -g -feliminate-unused-debug-types  -g -Wall -W -D_REENTRANT -fPIC -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../QT_Project1 -I. -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/include/qt5 -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/include/qt5/QtWidgets -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/include/qt5/QtGui -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/include/qt5/QtCore -I. -I. -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/lib/qt5/mkspecs/linux-oe-g++ -o main.o ../QT_Project1/main.cpp
arm-angstrom-linux-gnueabi-g++  -mfpu=vfpv3-d16 -march=armv7-a -mthumb -mfpu=vfp  -mfloat-abi=hard --sysroot=/usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi -c -pipe  -O2 -pipe -g -feliminate-unused-debug-types  -g -Wall -W -D_REENTRANT -fPIC -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../QT_Project1 -I. -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/include/qt5 -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/include/qt5/QtWidgets -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/include/qt5/QtGui -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/include/qt5/QtCore -I. -I. -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/lib/qt5/mkspecs/linux-oe-g++ -o mainwindow.o ../QT_Project1/mainwindow.cpp
/usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/bin/qt5/moc -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/lib/qt5/mkspecs/linux-oe-g++ -I/home/ub_serpent_host/QT_Projects/QT_Project1 -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/include/qt5 -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/include/qt5/QtWidgets -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/include/qt5/QtGui -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/include/qt5/QtCore -I. -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include ../QT_Project1/mainwindow.h -o moc_mainwindow.cpp
arm-angstrom-linux-gnueabi-g++  -mfpu=vfpv3-d16 -march=armv7-a -mthumb -mfpu=vfp  -mfloat-abi=hard --sysroot=/usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi -c -pipe  -O2 -pipe -g -feliminate-unused-debug-types  -g -Wall -W -D_REENTRANT -fPIC -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../QT_Project1 -I. -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/include/qt5 -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/include/qt5/QtWidgets -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/include/qt5/QtGui -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/include/qt5/QtCore -I. -I. -I/usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/lib/qt5/mkspecs/linux-oe-g++ -o moc_mainwindow.o moc_mainwindow.cpp
arm-angstrom-linux-gnueabi-g++  -mfpu=vfpv3-d16 -march=armv7-a -mthumb -mfpu=vfp  -mfloat-abi=hard --sysroot=/usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o QT_Project1 main.o mainwindow.o moc_mainwindow.o   -L/usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGLESv2 -lpthread 
15:18:01: The process "/usr/bin/make" exited normally.
15:18:01: Elapsed time: 00:02.

and when I give the deploy all command

15:20:42: Running steps for project QT_Project1...
15:20:42: Starting: "/usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/bin/qt5/qmake" /home/ub_serpent_host/QT_Projects/QT_Project1/QT_Project1.pro -r -spec /usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/lib/qt5/mkspecs/linux-oe-g++ CONFIG+=debug
15:20:42: The process "/usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/bin/qt5/qmake" exited normally.
15:20:42: Starting: "/usr/bin/make" 
make: Nothing to be done for 'first'.
15:20:42: The process "/usr/bin/make" exited normally.
15:20:42: The remote file system has 711 megabytes of free space, going ahead.
15:20:42: Deploy step finished.
15:20:42: No deployment action necessary. Skipping.
15:20:42: Deploy step finished.
15:20:42: Elapsed time: 00:00.

when I try to start debug the follwing message comes

Debugging starts
Listening on port 10000
Remote debugging from host 13.13.13.13
Debugging has finished

Also two dialoge box comes
[upload|J/eENSZB8qN90Os1L2LhH0Ef+ug=]
[upload|MmLr3UXxVTVKX2l7T2o0sN13duY=]

Thanks for reading

Hi,

1) Find in directory installed Framework Qt and edit the file in Tools/QtCreator/bin/qtcreator.sh, it’s like below:

#! /bin/sh

# Use this script if you add paths to LD_LIBRARY_PATH
# that contain libraries that conflict with the
# libraries that Qt Creator depends on.

makeAbsolute() {
    case $1 in
        /*)
            # already absolute, return it
            echo "$1"
            ;;
        *)
            # relative, prepend $2 made absolute
            echo `makeAbsolute "$2" "$PWD"`/"$1" | sed 's,/\.$,,'
            ;;
    esac
}
.... more lines

Add in first line before all:

. /usr/local/oecore-x86_64/environment-setup-armv7at2hf-neon-angstrom-linux-gnueabi

#! /bin/sh

# Use this script if you add paths to LD_LIBRARY_PATH
# that contain libraries that conflict with the
# libraries that Qt Creator depends on.

makeAbsolute() {
    case $1 in
        /*)
            # already absolute, return it
            echo "$1"
            ;;
        *)
            # relative, prepend $2 made absolute
            echo `makeAbsolute "$2" "$PWD"`/"$1" | sed 's,/\.$,,'
            ;;
    esac
}

… more lines

After this, open IDE QtCreator:

you_path_Qt/Tools/QtCreator/bin/qtcreator.sh

2) In Qt mkspec add: linux-oe-g++

3) In your target(Board Toradex) GDB is installed? However, the image must have support for GDB to work with the librarys, for example to buildsystem with Yocto enable dbg-pkgs and tools-debug.


Cleiton Bueno

Blog | Linkedin | B2Open

In my case that path doesn’t exist. But I found one qtcreator.sh somewhere else and tried editing it.
But permission issue.
Since it is not in the path mentioned I didnt tried again.
can you please confirm the path I should look for?

Please share your “Debuggers” tab in “Builds & Run”, and your project .pro file

does the application start on the target module? Which Bsp Version is running on the target module?

Debug messages

Cannot run: No command given.
Cannot run: No command given.
Debugging starts
Listening on port 10000
Remote debugging from host 13.13.13.13
Debugging has finished

If I run the application in target from QT

Cannot run: No command given.
Cannot run: No command given.

This is my tool chain file from oe build
angstrom-glibc-x86_64-armv7at2hf-vfp-v2016.12-toolchain.sh
and the image tarball from the same buil is
Colibri-T20_LXDE-Image_2.7b5-20180208.tar.bz2
THis is the image running in the T20alt text

The Qt Project file aI am attaching

link text

link text