department of computer engineering dongguk university. prof. jin-woo jung [email protected] qt /...
TRANSCRIPT
![Page 2: Department of Computer Engineering Dongguk University. Prof. Jin-Woo Jung jwjung@dongguk.edu Qt / Embedded](https://reader035.vdocuments.us/reader035/viewer/2022062803/56649f4d5503460f94c6d50e/html5/thumbnails/2.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022062803/56649f4d5503460f94c6d50e/html5/thumbnails/3.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022062803/56649f4d5503460f94c6d50e/html5/thumbnails/4.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022062803/56649f4d5503460f94c6d50e/html5/thumbnails/5.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022062803/56649f4d5503460f94c6d50e/html5/thumbnails/6.jpg)
Qt/Embedded vs Qt/X11
6
![Page 7: Department of Computer Engineering Dongguk University. Prof. Jin-Woo Jung jwjung@dongguk.edu Qt / Embedded](https://reader035.vdocuments.us/reader035/viewer/2022062803/56649f4d5503460f94c6d50e/html5/thumbnails/7.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022062803/56649f4d5503460f94c6d50e/html5/thumbnails/8.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022062803/56649f4d5503460f94c6d50e/html5/thumbnails/9.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022062803/56649f4d5503460f94c6d50e/html5/thumbnails/10.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022062803/56649f4d5503460f94c6d50e/html5/thumbnails/11.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022062803/56649f4d5503460f94c6d50e/html5/thumbnails/12.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022062803/56649f4d5503460f94c6d50e/html5/thumbnails/13.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022062803/56649f4d5503460f94c6d50e/html5/thumbnails/14.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022062803/56649f4d5503460f94c6d50e/html5/thumbnails/15.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022062803/56649f4d5503460f94c6d50e/html5/thumbnails/16.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022062803/56649f4d5503460f94c6d50e/html5/thumbnails/17.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022062803/56649f4d5503460f94c6d50e/html5/thumbnails/18.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022062803/56649f4d5503460f94c6d50e/html5/thumbnails/19.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022062803/56649f4d5503460f94c6d50e/html5/thumbnails/20.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022062803/56649f4d5503460f94c6d50e/html5/thumbnails/21.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022062803/56649f4d5503460f94c6d50e/html5/thumbnails/22.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022062803/56649f4d5503460f94c6d50e/html5/thumbnails/23.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022062803/56649f4d5503460f94c6d50e/html5/thumbnails/24.jpg)
Reference
www.wikipedia.org
24