How to use QT On the IMX31-3STACK board.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to use QT On the IMX31-3STACK board.

4,096 Views
Ramesh_Danlaw
Contributor I
Hi ,
 
 I am new to  IMX31 -3stack board. I want to develop a QT Applicaiotn on this board . I am using the   LiNUX  Bsp  "IMX31_PDK_LINUX_BSP_R13".  
 
 As i am new i do not know
 1. How to create a QT Application(Any Hello world progarm)?
 2. How to compile the QT Applicaiton.
 3. How to run the QT APPLICATION.
4. Any turorial on Usage of the QT On this board?
 
Could any one helps me? It would be a grate help for me.
 
Thank you,
S.Ramesh Chandra.
0 Kudos
5 Replies

614 Views
fabio_estevam
NXP Employee
NXP Employee
In order to build Qtopia you need to select the following packages in LTIB (./ltib -c , then under Package list mark the following): alsa-lib , libpng, tslib
 
On your host PC you need to have the following packages installed:

Before building the Qtopia package from source, several packages must

be installed on your host. The exact package names may vary, depending

on your linux distro.

* zlib:

rpm-based distros: install zlib and zlib-devel

debian-based distros: install zlib and zlib-dev

* libuuid:

rpm-based distros: install e2fsprogs and e2fsprogs-devel

debian-based distros: install libuuid and uuid-dev

* libjpeg:

rpm-based distros: install libjpeg

debian-based distros: install libjpeg and libjpeg-dev

* libpng:

rpm-based distros: install libpng and libpng-devel

debian-based distros: libpng and libpng-dev

 
and also:
 

libx11-dev, libpng-dev, libjpeg-dev, Libxext-dev, x11proto-xext-dev, qt3-dev-tools-embedded, libxtst-dev

Regards,

Fabio Estevam

0 Kudos

614 Views
LauriaB
Contributor I

I have a very similar question, except regarding the iMX27 pdk. Did you ever figure out what to do?


Lauria

0 Kudos

614 Views
ancuga
Contributor I

I´m in the same point as Laura. Did you figure out what we have to do??

 

Thanks in advanced

0 Kudos

614 Views
Ramesh_Danlaw
Contributor I
Hi,
 
 Thanks for your mail. I am able to build the QTOPIA for imx31.  I want to compile a qt application . I got a QT application hellow world given below.
 
int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     QPushButton hello("Hello world!");
     hello.resize(100, 30);
     hello.show();
     return app.exec();
 }
 
My question is
 
a. How to compile this application using the ltib.
b. How to run this compiled application on the imx31 pdk 1.3.
 
Thank you,
S.Ramesh Chandra.
0 Kudos

614 Views
sutanu
Contributor I

Hi Ramesh,

 

I have tried the same thing on iMx31. Here are the steps:

 

First you have to create a makespecs for the board. you can take "linux-arm-g++" for reference.

 

Now in this folder edit the qmake.conf file, edit the following variable settings to:

 

QMAKE_CC = arm-none-linux-gnueabi-gcc
QMAKE_CXX = arm-none-linux-gnueabi-g++
QMAKE_LINK = arm-none-linux-gnueabi -g++
QMAKE_LINK_SHLIB = arm-none-linux-gnueabi-g++

QMAKE_AR = arm-none-linux-gnueabi-ar cqs
QMAKE_OBJCOPY = arm-none-linux-gnueabi-objcopy
QMAKE_RANLIB = arm-none-linux-gnueabi –ranlib

 

After configuring the Qt using ltib, the host tools (qmake, moc etc.) will be installed in .qt folder in your home directory. This will help you to build your Qt application.

 

Now set the following environment variables as followed:

 

$ export LTIBDIR=<Where your LTIB is placed>

 

$ export PATH=$PATH:$LTIBDIR/rpm/BUILD/qtopia-free-2.2.0/qtopia/bin:$LTIBDIR/rpm/BUILD/qtopia-free-2.2.0/dqt/bin:/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin

 

$ export QMAKESPEC=<path to the makespecs>

 

 

Now you can use qmake to create the project as well as the makefile.

 

To create project file use:

$ qmake -project

 

Make sure you add the following lines in the project file:

TARGET      = myApp #name is mandatory

LIBPATH     += <Path to LTIBDIR>/rootfs/usr/lib

LIBS        += -ljpeg -lts
 

 

To create make-file from project use:

$ qmake

 

To build use:

$ make

 

Now after building the app (say myApp) copy it to $LTIBDIR/rootfs/<whereever you want>

 

Now use the rootfs to boot your board, In terminal (If you have booted with terminal support)

set the following environment variables:

 

$ export QTDIR=/opt/Qtopia

$ export LD_LIBRARY_PATH=$QTDIR/lib

 

now you can run your application

$ ./myApp

 

 

0 Kudos