Top Banner
Department of Computer Engineering Dongguk University. Prof. Jin-Woo Jung [email protected] Qt / Embedded
24

Department of Computer Engineering Dongguk University. Prof. Jin-Woo Jung [email protected] Qt / Embedded.

Jan 14, 2016

Download

Documents

Lydia Howard
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Department of Computer Engineering Dongguk University. Prof. Jin-Woo Jung jwjung@dongguk.edu Qt / Embedded.

Department of Computer EngineeringDongguk University.

Prof. Jin-Woo [email protected]

Qt / Embedded

Page 2: Department of Computer Engineering Dongguk University. Prof. Jin-Woo Jung jwjung@dongguk.edu Qt / Embedded.

What is the Qt?

Qt is a cross-platform application development framework, widely used for the development of GUI programs (in which case it is known as a Widget toolkit).

Qt is used for developing non-GUI programs such as console tools and servers.

2

Page 3: Department of Computer Engineering Dongguk University. Prof. Jin-Woo Jung jwjung@dongguk.edu Qt / Embedded.

Varieties

Qt/X11 — Qt for X Window System (Unix / Linux) Qt/Mac — Qt for Apple Mac OS X .Qt/Windows — Qt for Microsoft WindowsQt/Embedded — Qt for embedded platforms

(PDA, etc ...)Qt Jambi — Qt for Java

3

What is the Qt?

Page 4: Department of Computer Engineering Dongguk University. Prof. Jin-Woo Jung jwjung@dongguk.edu Qt / Embedded.

Qt: GUI libraryBased on X-window

Qt/EmbeddedBased on Frame Buffer which is resource of kernel

Frame BufferVirtual buffer for graphic hardwareSome graphic cards have physical hardware for

frame bufferSome graphic cards have application for frame

buffer

4

What is the Qt?

Page 5: Department of Computer Engineering Dongguk University. Prof. Jin-Woo Jung jwjung@dongguk.edu Qt / Embedded.

5

The characteristic of Qt/Embedded

650KB ~ 5MB according to options.providing various platforms.providing an environment that is compatible with the

source level of Qt/X11, Qt/Windows, and Qt/MAC.it is possible that applications are concurrently

executed.direct video frame buffer access.providing TrueType and BDF(Bitmap Distribution

Format)providing multi-language, UNICODE, and

globalizationopen source.

Page 6: Department of Computer Engineering Dongguk University. Prof. Jin-Woo Jung jwjung@dongguk.edu Qt / Embedded.

Qt/Embedded vs Qt/X11

6

Page 7: Department of Computer Engineering Dongguk University. Prof. Jin-Woo Jung jwjung@dongguk.edu Qt / Embedded.

Qt/Embedded Install Download SDK Port host environment to use Qt library Porting SDK

Configure SDK source files embedded hardware environmentCompile SDKConfirm porting

Configure target kernel compile configuration Install tmake

Download SDK Configure host environment to use tmake Confirm porting

Configure target board environment to use Qt library

7

Page 8: Department of Computer Engineering Dongguk University. Prof. Jin-Woo Jung jwjung@dongguk.edu Qt / Embedded.

Download SDK

Homepage of Trolltechhttp://www.trolltech.com

FTP server of Trolltechftp://ftp.trolltech.com/qt/source/qt-embedded-2.3.2.tar.gz

qt-embedded-2.3.2.tar.gzDownload and copy to the directory, “/Qt/”

8

Page 9: Department of Computer Engineering Dongguk University. Prof. Jin-Woo Jung jwjung@dongguk.edu Qt / Embedded.

Porting SDKRelease compression

Edit the file “/root/.bashrc”

Refresh the path

9

# mkdir /Qt# cd /Qt # tar -xzvf qt-embedded-2.3.2.tar.gz

export QTDIR=/Qt/qt-2.3.2 export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATHexport PATH=$PATH:$QTDIR/bin

# source /root/.bashrc# echo $PATH

Page 10: Department of Computer Engineering Dongguk University. Prof. Jin-Woo Jung jwjung@dongguk.edu Qt / Embedded.

Porting SDKDefault pointer is for mouse.

LDS2000’s LCD is touch screen.The parameter from kernel to application is

must be touch screen, not mouse values.

10

Page 11: Department of Computer Engineering Dongguk University. Prof. Jin-Woo Jung jwjung@dongguk.edu Qt / Embedded.

Porting SDKEdit the file “/Qt/qt-2.3.2/src/kernel

/qwsmouse_qws.cpp”

11

Page 12: Department of Computer Engineering Dongguk University. Prof. Jin-Woo Jung jwjung@dongguk.edu Qt / Embedded.

Porting SDKEdit the file “/Qt/qt-2.3.2/src/kernel

/qwsmouse_qws.cpp”

12

Page 13: Department of Computer Engineering Dongguk University. Prof. Jin-Woo Jung jwjung@dongguk.edu Qt / Embedded.

Porting SDKEdit the file “/Qt/qt-2.3.2/configs/linux-arm-g+

+-shared”

13

-> 9 번째 줄

-> 61 번째 줄

Page 14: Department of Computer Engineering Dongguk University. Prof. Jin-Woo Jung jwjung@dongguk.edu Qt / Embedded.

Porting SDKEdit the file “/Qt/qt-2.3.2/Makefile”

14

Modify#all: symlinks src-moc src-mt sub-src sub-tools sub-tutorial sub-examples

all: symlinks src-moc src-mt sub-src sub-tools #sub-tutorial sub-examples

Line #11

Page 15: Department of Computer Engineering Dongguk University. Prof. Jin-Woo Jung jwjung@dongguk.edu Qt / Embedded.

Porting SDKRun Makefile

License? YesFeature configuration? 5. Everything(5MB)Pixel depth? 16Frame Buffer support? Yes

15

# cd $QTDIR/configs# ./configure –xplatform linux-arm-g++-shared

Page 16: Department of Computer Engineering Dongguk University. Prof. Jin-Woo Jung jwjung@dongguk.edu Qt / Embedded.

Porting SDK Using the command, “ls -al”, in the directory,

“$QTDIR/lib ”

16

Page 17: Department of Computer Engineering Dongguk University. Prof. Jin-Woo Jung jwjung@dongguk.edu Qt / Embedded.

Configure target kernel compile configuration Include touch screen driver(ADS7853) to kernel

compile option

17

Page 18: Department of Computer Engineering Dongguk University. Prof. Jin-Woo Jung jwjung@dongguk.edu Qt / Embedded.

18

Install tmake - Download

Homepage of Trolltechhttp://www.trolltech.com

FTP server of Trolltechftp://ftp.trolltech.com/freebies/tmake/tmake-

1.8.tar.gz

tmake-1.8.tar.gzDownload and copy to the directory, “/Qt/”

Page 19: Department of Computer Engineering Dongguk University. Prof. Jin-Woo Jung jwjung@dongguk.edu Qt / Embedded.

Install tmake - Configure host environment

Release compression

Edit the file “/root/.bashrc”

Refresh the path

19

# tar -xzf tmake-1.8.tar.gz

export TMAKEPATH=/Qt/tmake-1.8/lib/qws/linux-arm-g++ export PATH=$PATH:/Qt/tmake-1.8/bin

# source /root/.bashrc# echo $PATH

Page 20: Department of Computer Engineering Dongguk University. Prof. Jin-Woo Jung jwjung@dongguk.edu Qt / Embedded.

Install tmake - Confirm porting “cat $QTDIR/examples/hello/hello.pro”

TEMPLATE: project type (app, lib, subdirs)DEPENDPATH: path of library files

Refer the file “~/tmake-1.8/doc/tmake_ref.html”

20

Page 21: Department of Computer Engineering Dongguk University. Prof. Jin-Woo Jung jwjung@dongguk.edu Qt / Embedded.

Install tmake - Confirm porting

Run tmake (-o option)

progen programGenerage .pro file (-o option)header files and source files needed

include all files in current directory

21

# cd $QTDIR/examples/hello# tmake -o Makefile hello.pro

# progen -o hello2.pro hello.h hello.cpp main.cpp

# progen -o hello3.pro

Page 22: Department of Computer Engineering Dongguk University. Prof. Jin-Woo Jung jwjung@dongguk.edu Qt / Embedded.

Configure target board environment to use QT library

Copy Qt/Embedded library & font.

Edit the file “/NFS/.bashrc”

22

# mkdir /NFS/usr/local/qt-2.3.2# cp –rf $QTDIR/lib /NFS/usr/local/qt-2.3.2

export QTDIR=/usr/local/qt-2.3.2 export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATHexport QWS_DISPLAY=Transformed:Rot0export QWS_MOUSE_PROTO=TPanel:/dev/ts

Page 23: Department of Computer Engineering Dongguk University. Prof. Jin-Woo Jung jwjung@dongguk.edu Qt / Embedded.

Configure target board environment to use QT library

Edit the file “/NFS/etc/inittab”not to execute tiny-X

Test hello

23

#x:5:respawn:/etc/X11/prefdm –nodaemon (# 을 삭제 하세요 .)

# cd $QTDIR/examples/hello# make# cp -rf hello /NFS

[[email protected] /]$ source /.bashrc[[email protected] /]$ /hello -qws

Page 24: Department of Computer Engineering Dongguk University. Prof. Jin-Woo Jung jwjung@dongguk.edu Qt / Embedded.

Reference

www.wikipedia.org

24