PDA

View Full Version : Cross compiling Qtopia 2.2.0 for ARM



bakul2331
10th July 2010, 10:36
Hi ,

I have developed a QT application for desktop and it is working fine. Now I want to move it on a arm based board with 7" touch screen. I downloaded qtopia 2.2.0 and extracted it in my ubuntu (v10.04) host. When I performed 'make' after './configure', I got following error. Can anybody help?

* ---------------------------------------------------------------------------
*
* ERROR: Building Qtopia Tools has failed.
*
* Please investigate the problem by looking at the error messages in the
* make output.
* The Qtopia tools can be build using the separate buildQtopiaTools script
* which can be found in the qtopia/scripts directory of the package. The
* script is also invoked with the command 'make tools' from the package root
* directory.
*
* On most machines the default configuration options in the script works fine.
* In case this doesn't work the configure parameters in the buildQtopiaTools
* script need to be tweaked to fit the environment/compiler used on the machine
* and then run manually from the cmd line.
*
* Please make sure that the following binaries exist before trying to build
* Qtopia:
* /opt/EmbedSky/Qte/arm-qtopia-2.2.0/qt2/bin/moc
* /opt/EmbedSky/Qte/arm-qtopia-2.2.0/qt2/bin/uic
* /opt/EmbedSky/Qte/arm-qtopia-2.2.0/qt2/bin/qvfb
* /opt/EmbedSky/Qte/arm-qtopia-2.2.0/dqt/bin/lrelease
* /opt/EmbedSky/Qte/arm-qtopia-2.2.0/dqt/bin/lupdate
*
* As a rule, these tools need to be built only once.
*
************************************************** ****************************

I do not find above files marked in "red" color in my PC.

msrihari
10th July 2010, 11:56
(i think you are using embed sky board, steps for installing qt is available from the manual supported by the board)

you have to add options for configure script when installing qt, following are the configuration script for my board.

#!/bin/bash
tar xfvz qtopia-2.2.0.tar.gz

cd qtopia-2.2.0
echo yes | ./configure -qte '-embedded -no-xft -qconfig qpe -depths 16,32 -system-jpeg -qt-zlib -qt-libpng -gif -no-g++-exceptions -no-qvfb -xplatform linux-arm-g++ -tslib' -qpe 'edition pda -displaysize 240x320 -fontfamilies "helvetica fixed micro smallsmooth smoothtimes unifont" -xplatform linux-arm-g++ -luuid' -qt2 '-no-opengl -no-xft' -dqt '-no-xft -thread'

make && make install


and also arm cross compile tools need to be installed.

bakul2331
12th July 2010, 17:17
Thanks for your kind reply.

Yes, I am using Embedsky board.

I am following same steps as you mentioned above but build fails as I mentioned before. I am using ubuntu v10.04. Do you think it will work if I try on Redhat or fedora?

msrihari
16th July 2010, 07:12
i am working on fedora 9. try to test on fedora

bakul2331
17th July 2010, 04:41
I tried with Qt v4.5.2 and I am able to compile Qt and my application sucessfully.
But when I run this application on my EM2440 board, It gives "illegal instruction" error.

I have checked that I am using correct tool-chain. If I compile other simple "Hello world" (with printf) program then It works fine.

I have compiled qt with "static" flag so all libraries are statically linked with application binary. I attached a file which mentions all the steps which I follw to compile tslib,qt and application.

Thanks in advance for help.

msrihari
17th July 2010, 14:37
try to compile examples from qt and run on your board ( like mouse calibration) if they work fine then may the problem is in your application. ie., if your using any delete widget .or u have to include total path file instead of just ./inverter -qws as in your script.

or you may be using different arm cross compiler.
i am using arm-linux-gcc, there is also another called arm-none-linux-gnueabi-gcc may be that you are not provided perfectly


or this links may help you out.
http://www.friendlyarm.net/forum/topic/439
http://www.qtforum.org/article/32858/illegal-instruction.html
http://automon.donaloconnor.net/cross-compiled-qt-embedded-step-by-step/74/

bakul2331
18th July 2010, 05:52
Thanks for you help.

Now I am able to run my application successfully on board (I added many varibales in qmake.conf file as mentioned on http://www.friendlyarm.net/forum/topic/439) . But now when I touch buttons of my application, it goes in back ground and qtopia comes in foreground. If I run only my application without qtopia then touch screen does not work. I think this will be last problem , Once I get solutions of this,My application will start working on board as it works on PC.

bakul2331
19th July 2010, 17:14
Hi,

Now My problem is resolved now. I do not start Qtopia application and now my application works fine with touch screen. There was some problems with my environment variables.

Regards,
Bakul

felipe12357
19th July 2010, 17:53
hi bakul, im tring to do the same thing that you have done i could cross compile the package:

qt-everywhere-opensource-src-4.6.2 with out mistakes, and i create simple program on qtcreator, after that i did your steps:

i pasted some file of my project on /usr/local/Qt/bin and executed your commands:

************************************************** **********
qmake -project
qmake -unix CONFIG+=debug -nodepend -o Makefile Inverter.pro
make

now i want to know what files should i send to my device and where do i put this lines:


export TSLIB_TSEVENTTYPE=INPUT
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/usr/input/ts
export TSLIB_CALIBFILE=/usr/etc/pointercal
export TSLIB_CONFFILE=/usr/etc/ts.conf
export TSLIB_PLUGINDIR=/usr/lib/ts
export LD_LIBRARY_PATH=/usr/local/Qt/lib
export QTDIR=/usr/local/Qt
export QWS_MOUSE_PROTO=tslib:/usr/input/ts
export QWS_DISPLAY=LinuxFB:mmWidth=310:mmHeight=190

where do i added this lines?? what file do i have to change, or do i just copy this on my device console??

thanks!!

felipe12357
19th July 2010, 18:11
i teste my programm with your command line

./hello.pro -qws but appears me this mistake:

./hello: line1: syntax error_ "(" unexpected (expecting ")")

what could i be making wrong??

bakul2331
20th July 2010, 03:51
You are running wrong file. When your make completes it will generate a binary with name "hello". Run this file on board

Also can you make sure that you have set all above environment variables correctly? You have to change path as per your board.

felipe12357
21st July 2010, 16:18
friend i decided start again following your instrutions but it continues with the same problem, im insert you this image that show how work my test program on my desktop machine, my console, when i write the commands lines and the files it created me

like you see it create a file .exe and i tested on my desktop machine, i made double click on it and it worked, isnt it suppose that after make it cross compile it shouldnt work on my desktop machine??

Friend i hope that you can see what im doing wrong

thanks for all you help