Finally I succeeded setting up the development environment for building QtEmbedded 4.6.3 application using QtCreator. My intention was to make complete video tutorial on all the process from installing the tools to compiling a "hello world" application and running it on FriendlyARM. Lack of time doesn't allow me to complete it. That's why I decided to publish my video "notes". They have been on YouTube for some time. They are just record of my desktop with no comment. Also here are my text notes I made during the installation process. Hope somebody might find them usefull.
Here are the videos:
How to install the cross-copiler for mini2440 on host PC (Video 1)
How to compile QtEmbedded 4.6.3 for mini2440 (Video 2)
Install QtCreator and set it up for QtEmbedded. (Video 3)
-------------------------------------------------------------------------
**** PC Installation ****
1. Install the cross-compiler to /usr/local/arm/4.3.2
In PATH variable add folder /usr/local/arm/4.3.2/bin
2. Compile QtEmbedded 4.6.3 on PC. The result of the compilation are the libraries for ARM (libQtCore.so.4.6.3, libQtGui.so.4.6.3 и т.н) and tools for PC like qmake, uic, moc etc. Do it as root
3.1 Unzip arm-qte-463-20100802tar.gz
3.2 Enter the arm-qte-4.6.3 folder and run configuration script (config-options file shown in Video 2):
./configure -prefix /qtbuild/ -release -shared -fast -pch -no-qt3support -qt-sql-sqlite -no-libtiff -no-libmng -qt-libjpeg -qt-zlib -qt-libpng -qt-freetype -no-openssl -nomake examples -nomake demos -nomake tools -optimized-qmake -no-phonon -no-nis -no-opengl -no-cups -no-xcursor -no-xfixes -no-xrandr -no-xrender -no-xkb -no-sm -no-xinerama -no-xshape -no-separate-debug-info -xplatform qws/linux-arm-g++ -embedded arm -depths 16 -no-qvfb -qt-gfx-linuxfb -no-gfx-qvfb -no-kbd-qvfb -no-mouse-qvfb-qt-kbd-usb -confirm-license -qt-mouse-tslib
The -prefix option determines location of the compiled files. I this case it is /qtbuild
Important: Use exactly this version!
3.3 Compile (takes more than an hour):
$ make (or gmake)
$ make install (or gmake install)
3. Install IDE QtCreator
Make qt-sdk-linux-x86-opensource-2009.05.bin executable:
LinuxHost>chmod +x qt-sdk-linux-x86-opensource-2009.05.bin
LinuxHost>./qt-sdk-linux-x86-opensource-2009.05.bin
4. Configure QtCreator with path to qmake. The qmake tool uses the project file .pro to generate Makefile
From Tools-Options in QMake location add path /qtbuild/bin/qmake and click rebuild
5. Examples - in folder arm-qte-4.6.3/qt-everywhere-opensource-src-4.6.3 there is en example. Open the .pro file in QtCreator and build it.
------------------------------------------------------------
*** Configure FriendlyARM ***
The last FriendlyARM came with QtEmbedded 4.6.3 и tslib. If the board is older instead just install the file system rootfs_qtopia_qt4_20110305.img (option "y" in DWN) Doing this you don't have to upload the libraries to FriendlyARM.
This is done in Windows. Next step is to configure IP address and password with passwd command from console.
------------------------------------------------------------
*** GLOBAL VARIABLES ***
For applications to be abble to access the libraries global variables have to be set. Set them to use already installed in the file system libraries so you do not have to upload compiled QtEmbedded and tslib libraries. That's why using exactly 4.6.3 version is important.
Remark: check the fluidlauncher to see how you can make variables set on start
export USER LOGNAME PS1 PATH
export QTDIR=/usr/local/Trolltech/QtEmbedded-4.6.3-arm
export LD_LIBRARY_PATH=$QTDIR/lib
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/input/event0
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=/usr/local/etc/ts.conf
export QWS_SIZE=800x480
export QWS_DISPLAY="LinuxFb:mmWidth135:mmHeight155"
export QWS_MOUSE_PROTO="Tslib:/dev/input/event0"
export TSLIB_PLUGINDIR=/usr/local/lib/ts
Remark:Change the display size if necessary. This settings is for 7".
------------------------------------------------------------
*** fonts **
transfer from PC from /qtbuild/lib/fonts/ fonts to
FriendlyARM /usr/local/Trolltech/QtEmbedded-4.6.3-arm/lib/fonts
------------------------------------------------------------
*** TSLIB ***
When try to run Qt4 application from console if there is no link to tslibrary an error mesage is shown:
error while loading shared libraries: libts-0.0.so.0: cannot open shared object file: No such file or directory
Make symbol link:
ln -s /usr/local/lib/libts-0.0.so.0 /usr/local/Trolltech/QtEmbedded-4.6.3-arm/lib/libts-0.0.so.0
------------------------------------------------------------
*** Screen Calibration ***
/usr/local/bin/ts_calibrate - this is the application for calibration
//it can be run from qtopia
------------------------------------------------------------
*** runnin the application ***
Diasble the Qtopia and run the application with qws option. It makes the application responsible for writing to the frame buffer.
/myapp -qws
------------------------------------------------------------
Абонамент за:
Коментари за публикацията (Atom)
Mini2440, UBUNTU, ARM-LINUX-GCC: ld: cannot find -lqtopia2
ОтговорИзтриванеHello everybody!
I'm a new user of UBUNTU, FORUM, and Mini2440 Platform.
I known all 2 mounth ago and I must develop with this.
I have a problem: I can't start beacause I never compile example project
"Hello".
I have done a virtual machine with Virtual Box on Windows7 64bit and I have
install and upgrade UBUNTU 11.10.
With terminal I try to compile the "Hello" example from CD and I read so:
ubuntu@ubuntu-VirtualBox:~$ cd
/home/ubuntu/opt/FriendlyARM/mini2440/arm-qtopia/hello
ubuntu@ubuntu-VirtualBox:~/opt/FriendlyARM/mini2440/arm-qtopia/hello$ ls
build description-pak hello.cpp hello.h hello.pro.user Makefile
copia hello_base.ui hello.desktop hello.pro main.cpp
ubuntu@ubuntu-VirtualBox:~/opt/FriendlyARM/mini2440/arm-qtopia/hello$
./build
...
.obj/release-shared/hello_base.o .obj/release-shared/moc_hello_base.o
-luuid -lqtopia2 -lqtopia -lqpe
-L/home/ubuntu/opt/FriendlyARM/mini2440/arm-qtopia/qtopia-2.2.0-FriendlyARM/qtop
ia/lib
-L/home/ubuntu/opt/FriendlyARM/mini2440/arm-qtopia/qtopia-2.2.0-FriendlyARM/qt2/
lib
-lqte
/home/ubuntu/opt/FriendlyARM/toolschain/4.4.3/bin/../lib/gcc/arm-none-linux-gnue
abi/4.4.3/../../../../arm-none-linux-gnueabi/bin/ld:
cannot find -lqtopia2
collect2: ld returned 1 exit status
make: *** [hello] Errore 1
There is somebody to help me?
Thank you so much!
Fede.
PS:My e-mail address is fdscarpella@gmail.com
Hello,
ОтговорИзтриванеFirst of all, I would like to thank you for your tutorials. They're great.
I've followed your guides literally:
-I've successfully compiled QtEmbebbed 4.6.3
-I've installed QtCreator
However, my QtCreator is unable to detect the libraries. See my picture:
http://tinypic.com/r/2f0c8qb/6
The path is correct, no doubt (the qmake is there). However it says "Cannot be compiled"
Any ideas about what's wrong?
Regards
Hello Charles,
ОтговорИзтриванеSorry for the really late reply. Did you succeed compiling ?
I don't know what may be the cause of this problem. It's possible because you try to use newer version of QtCreator. Try with qt-sdk-linux-x86-opensource-2009.05.bin. It's older but it works for sure.