Using The Qt Creator Ide; Configuring Qt Creator - GARZ&FRICKE GUF-Yocto-34.0-r5756-0-VINCELL User Manual

Embedded computer systems
Table of Contents

Advertisement

GUF-Yocto-34.0-r5756-0
TEMPLATE = app
TARGET = myqtapp
QT = core gui widgets
SOURCES += \
main.cpp
Setup the build environment.
!
$ source
/opt/guf/GUF-Yocto-34.0-r5756-0-sdk/environment-setup-vincell-guf-linux-gnueabi
,
Note: The above command assumes that you have extracted the SDK in the default directory under
Yocto-34.0-r5756-0-sdk. If the SDK is located in a different directory, you have to change the directory accord-
ingly.
Execute the following command to create a
$ qmake myqtapp.pro
$ make
Now, there is the
myqtapp
system's
/usr/bin
directory in one of the ways described in chapter
from the device shell.

7.4 Using the Qt Creator IDE

Apart from compiling Qt applications on the command line, Qt Creator can be used as a comfortable IDE for
developing, building and deploying applications for the target system. This section describes how to set up Qt
Creator and how to compile and deploy a sample application.
7.4.1 Configuring Qt Creator
To use Qt with the cross toolchain shipped with the Garz & Fricke BSP, the Qt version must be set up properly.
Furthermore, the device configuration for automatic deployment must be set up properly.
Our tests were performed using a virtual machine installation of Ubuntu 14.04 Desktop (amd64). The following
examples consider a Ubuntu 14.04 Desktop (amd64) installation. To install the Qt Creator from the terminal type
$ sudo apt-get install qtcreator qtcreator-plugin-cmake qtcreator-plugin-qnx
SFTP is used to deploy your program to the target device, thus SSH has to be installed as well:
$ sudo apt-get install ssh
To accept the ssh key of the Garz & Fricke device, create a manual ssh connection:
user@localhost$ ssh
The authenticity of host '172.20.56.212 (172.20.56.212)' can't be established.
ECDSA key fingerprint is a3:bf:37:99:04:37:81:91:46:5b:bc:76:d4:f1:56:dc.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '172.20.56.212' (ECDSA) to the list of known hosts.
Last login: Wed Sep 23 14:05:41 2015 from 172.20.42.189
root@vincell:~#
This needs to be repeated when the IP address or the ssh key of the device changes.
Each time the Qt Creator is startet some environment variables need to be set. It is the same process as in the
I
chapters
[
7.2 Simple command-line application]
and type
38
VINCELL
User Manual
¡
¡
Makefile
executable in the
myqtapp
root@172.20.56.212
and
and build the binary in the
directory. You can transfer this application to the target
I
[
3 Accessing the target system]
I
[
7.3 Qt-based GUI user
/opt/guf/GUF-
myqtapp
directory:
and run it
application]. Open a console

Advertisement

Table of Contents
loading

Table of Contents