GUF-Yocto-jethro-9.0-r7707-0
i.MX6
User Manual
TEMPLATE = app
TARGET = myqtapp
QT = core gui widgets
S= \
main.cpp
Setup the build environment.
$ source
,!
/opt/guf/GUF-Yocto-jethro-9.0-r7707-0-sdk/environment-setup-imx6guf-guf-linux-gnueabi
Note:
The above command assumes that you have extracted the SDK in the default directory under
/opt/guf/GUF-
Yocto-jethro-9.0-r7707-0-sdk
. If the SDK is located in a different directory, you have to change the directory
accordingly.
Execute the following command to create a
Makefile
and build the binary in the
myqtapp
directory:
$ qmake myqtapp.pro
$ make
Now, there is the
myqtapp
executable in the
myqtapp
directory. You can transfer this application to the target
system’s
/usr/bin
directory in one of the ways described in chapter
[
I
3 Accessing the target system]
and run it
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). Anyway the QT
version available in the repos for Ubuntu 14.04 is older then the qt version of the sdk (5.5.1).
To install a recent version, the released version needs to be downloaded from QT directly:
$ wget http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-linux-x64
,!
-5.5.1.run
$ chmod +x qt-opensource-linux-x64-5.5.1.run
$ ./qt-opensource-linux-x64-5.5.1.run
A wizard is started to install QT 5.5.1. Just follow the instruction of the wizard.
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@santaro:~#
50