Setup QT Creator with Yocto Build

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

Setup QT Creator with Yocto Build

51,093 Views
Joerg-SH
Contributor III

bitbaked meta-toolchain-qt

Install it  with

~/yocto/build/tmp/deploy/sdk$ poky-eglibc-x86_64-arm-toolchain-qt-1.4.1.sh

Download Qtcreator from here http://qt-project.org/downloads

and Install it to Your home directory

edit the bin/qtcreator.sh

source /opt/poky/1.4.1/environment-setup-armv7a-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
}

....

To do it before "#! /bin/sh" is IMPORTANT!!!!

In QtCreator i set

Compiler as

               /opt/poky/1.4.1/sysroots/x86_64-pokysdk-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++

Qt version as

        

                     /opt/poky/1.4.1/sysroots/x86_64-pokysdk-linux/usr/bin/qmake

sysroot as

                    /opt/poky/1.4.1/sysroots/armv7a-vfp-neon-poky-linux-gnueabi

Put them in a Kit

For connection to Your Board click on  Device  --->    Manage

Build a new project

and add some to the .pro file

Building the image for Your Board:

add        

TOOLCHAIN_HOST_TASK_append = " nativesdk-python-subprocess"

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

to Your localconfig

bitbake core-image-sato-sdk

set a password to root  via

ssh root@[boardip]

passwd

test connection via

sftp  root@[boardip]

start qtcreator

./qtcreator.sh

Message was edited by: Joerg Boge

Nachricht geändert durch Joerg Boge Thanks to Diego Gonzalez

Labels (3)
Tags (3)
28 Replies

899 Views
cleonbrown
Contributor I

i added the line " source /opt/poky/1.5.1/environment-setup-armv7a-vfp-neon-poky-linux-gnueabi"  to qtcreator.sh before "#! /bin/sh" line and I am still having the same problem. do you know what else could cause this. I dont think it is recognizing the line added to the qtcreator.sh file because when i launch it from terminal with the line it stated "source not found". please help.

i'm using poky version 1.5.1

0 Kudos

899 Views
cleonbrown
Contributor I

SOLVED: you must launch qtcreator like this:  ./qtcreator.sh ONLY.

0 Kudos

899 Views
controlhorus
Contributor III

Hi Joerg

Solved  adding the line:

TOOLCHAIN_HOST_TASK_append = " nativesdk-python-subprocess" 

in build/conf/local.conf from Yocto.

That adds the module subprocess to python used by QTcreator

Now I can view variables at breakpoint running an application on target.

Thanks

899 Views
controlhorus
Contributor III

Hello Joerg

We have followed this steps and have QT 4.8 applications running on both systems, Desktop and imx6 target. But we have problems with debugging:

on desktop: https://community.freescale.com/message/348541#348541 , and

on target: https://community.freescale.com/message/348540#348540

Desktop)

This problem seems to be related to python. But I am no used to it. It seems as if site.py was trying to import the get_config_var function from sysconfig.py. Then the process is stopped at the beggining of sysconfig.py. However the files are untouched from their compilation date. Any clue?

Target)

The message on the Debugger Log window seems to say that bb is a GDB command but I am no able to find it in any GDB page. I have a windows station with a test QT 5.0 instalation. There the bb command works. Both QTs, 4,8 and 5,.0, are using GDBs 7.5.1. So, is really bb a GDB command? Any hint about why bb is not defined?

Thanks and best regards

0 Kudos

899 Views
controlhorus
Contributor III

Hello

Found ... we think.

Line: bitbake meta-toolchain-qt

compiles a Python 2.7.3 without some default modules: for example subprocess

Line: source /opt/poky/1.4.1/environment-setup-armv7a-vfp-neon-poky-linux-gnueabi

changes PYTHONHOME and redirects it to /opt/poky.../python

When QTCreator execute the python dumpers to show the variables, it needs the lost modules. So we go to the next questions:

It is necessary use the /op7/poky/... /python or we can use Ubuntu python?

How can I say to meta-toolchain-qt to generate a complete python version?

Thanks and best regards

0 Kudos

899 Views
Joerg-SH
Contributor III

Hello Diego,

sorry I didn`t try that till now.

Have a look at Dereks Video.

http://www.youtube.com/watch?v=kP7uvOu9hoQ&feature=c4-overview-vl&list=PLF4A1A7E09E5E260A

I hope it will help.

Joerg

Am 05.09.2013 20:29, schrieb Diego Gonzalez:

>

Freescale Community <https://community.freescale.com/>

<https://community.freescale.com/>

>

Setup QT Creator with Yocto Build

Antwort von Diego Gonzalez

<https://community.freescale.com/people/controlhorus?et=watches.email.thread>

in /i.MX Community/ - Komplette Diskussion anzeigen

<https://community.freescale.com/message/348639?et=watches.email.thread#348639>

>

0 Kudos

899 Views
controlhorus
Contributor III

Thanks Joerg

Desktop Mode Debugger problem news)

We start QT after deleting the line:

     source /opt/poky/1.4.1/environment-setup-armv7a-vfp-neon-poky-linux-gnueabi

from qtcreator.sh. Without it, QT Debugger shows the variables and its values.

Something is not well defined inside that file and it makes fail the GDB local mode start.

We saw he video but I fear we have not enough experience to extract the conclusion we look for. We review it more slowly from time to time.

Best regards

0 Kudos

899 Views
Joerg-SH
Contributor III
0 Kudos