How to cross compile QT for LPC3250
- Seth_Bonner
- Topic Author
- Offline
- Premium Member
- Posts: 124
- Thanks: 0
How to cross compile QT for LPC3250
6 years 4 months ago
(This message was transferred over from our old forum)
Posted August 17, 2015
By Todd DeBoer
[hr]
How to cross compile QT for LPC3250
[hr]
(Follow up post)
Answered:
Cross-Compilation of the Qt Toolkit
Host Building – I used a VM of Fedora 14 in VMWare to do this.
Get the qt-embedded-4.7.3 bundle
Issue:
./configure -prefix /usr/local/qt-embedded-4.7.3 -embedded -no-largefile -exceptions -no-accessibility -no-qt3support -qt-zlib -no-gif -no-libtiff \
-qt-libpng -no-libmng -qt-libjpeg -no-openssl -no-nis -no-cups -depths 8,16,32 -qt-gfx-qvfb -qt-kbd-tty -qt-kbd-qvfb -qt-kbd-linuxinput \
-qt-mouse-linuxinput -qt-mouse-qvfb -qt-mouse-pc -silent -confirm-license -opensource -qt-sql-sqlite
and then:
make
Target Building
Set the path for the cross-compiler
export PATH=/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/:$PATH
Make ltib build tslib for your device so you can link to it
./ltib -m prep -p tslib
./ltib -m scbuild -p tslib
cd rpm/BUILD/tslib-<whatever>
sudo make -k install # installs to host but meh!
Now configure and build it
./configure -xplatform qws/linux-arm-gnueabi-g++ -embedded arm -prefix /usr/lpc3250-linux/local/qt-embedded-4.7.3 -qt-gfx-linuxfb -qt-gfx-vnc \
-no-largefile -exceptions -no-accessibility -no-qt3support -qt-zlib -no-gif -no-libtiff -qt-libpng -no-libmng -qt-libjpeg \
-no-openssl -no-nis -no-cups -depths 16 -qt-kbd-linuxinput -nomake demos -nomake examples -qt-mouse-linuxinput -qt-mouse-tslib \
-confirm-license -opensource -I/home/vmplanet/Desktop/ltib/rpm/BUILD/tslib-1.0/src/ \
-L/home/vmplanet/Desktop/ltib/rpm/BUILD/tslib-1.0/src/.libs/ -qt-sql-sqlite
If you get failure append -v on to the string. Do not install include /usr/include or /usr/lib or you will make Linux sad and get errors like invalid operand for code w
To cross-compile an app: add /usr/lpc3250-linux/local/qt-embedded-4.7.3/bin to PATH using export, once you’ve done that you can use
qmake
make
If you get an error, add :/home/vmplanet/Desktop/ltib/rpm/BUILD/tslib-1.0/src/.libs,-lrt to LFLAGS in the Makefile.
How to Enable the Touchscreen on Device
Check it works:
[root@nxp /]# cat /proc/bus/input/devices
I: Bus=0019 Vendor=0001 Product=0002 Version=0100
N: Name=”ts-lpc32xx”
P: Phys=lpc32xx/input0
S: Sysfs=/class/input/input0
U: Uniq=
H: Handlers=mouse0 event0
B: EV=b
B: KEY=400 0 0 0 0 0 0 0 0 0 0
B: ABS=3
Get the minor and major values for the module
cat /sys/class/input/input0/event0/dev
13:64
Create a device node for it
mknod /dev/input/event0 c 13 64
Setup the environment:
[root@nxp /]# export TSLIB_TSDEVICE=/dev/input/event0
[root@nxp /]# export TSLIB_CALIBFILE=/etc/pointercal
[root@nxp /]# export TSLIB_CONFILE=/etc/ts.conf
Add the following to /etc/ts.conf
module_raw input raw
module pthres pmin=1
module variance delta=100
module dejitter delta=10
module linear
Run ts_calibrate and touch the screen. Bask in the touchy goodness.
This should be rolled into your /etc/rc.local file or saved permanently in the rootfs.jffs generated by ltib.
Installing Qt
Once you have a cross-compiled qt build. Tar it all up, copy it across and extract into your system.
cd /lib
tar zxvf /mnt/mmc/qt.tar.gz
mv /lib/qt-embedded-4.7.3/lib/* /lib/
Using vi you will want to append the various settings required to make Qt work on an embedded platform so edit /etc/rc.S/rc.local
echo “Setting variables”
export TSLIB_TSDEVICE=/dev/input/event0
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFILE=/etc/ts.conf
export QT_QWS_FONTDIR=/lib/fonts/
export QWS_MOUSE_PROTO=tslib:/dev/input/event0
echo “Running Demo”
cd /
/<your_exe_here> -qws &
Posted August 17, 2015
By Todd DeBoer
[hr]
How to cross compile QT for LPC3250
[hr]
(Follow up post)
Answered:
Cross-Compilation of the Qt Toolkit
Host Building – I used a VM of Fedora 14 in VMWare to do this.
Get the qt-embedded-4.7.3 bundle
Issue:
./configure -prefix /usr/local/qt-embedded-4.7.3 -embedded -no-largefile -exceptions -no-accessibility -no-qt3support -qt-zlib -no-gif -no-libtiff \
-qt-libpng -no-libmng -qt-libjpeg -no-openssl -no-nis -no-cups -depths 8,16,32 -qt-gfx-qvfb -qt-kbd-tty -qt-kbd-qvfb -qt-kbd-linuxinput \
-qt-mouse-linuxinput -qt-mouse-qvfb -qt-mouse-pc -silent -confirm-license -opensource -qt-sql-sqlite
and then:
make
Target Building
Set the path for the cross-compiler
export PATH=/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/:$PATH
Make ltib build tslib for your device so you can link to it
./ltib -m prep -p tslib
./ltib -m scbuild -p tslib
cd rpm/BUILD/tslib-<whatever>
sudo make -k install # installs to host but meh!
Now configure and build it
./configure -xplatform qws/linux-arm-gnueabi-g++ -embedded arm -prefix /usr/lpc3250-linux/local/qt-embedded-4.7.3 -qt-gfx-linuxfb -qt-gfx-vnc \
-no-largefile -exceptions -no-accessibility -no-qt3support -qt-zlib -no-gif -no-libtiff -qt-libpng -no-libmng -qt-libjpeg \
-no-openssl -no-nis -no-cups -depths 16 -qt-kbd-linuxinput -nomake demos -nomake examples -qt-mouse-linuxinput -qt-mouse-tslib \
-confirm-license -opensource -I/home/vmplanet/Desktop/ltib/rpm/BUILD/tslib-1.0/src/ \
-L/home/vmplanet/Desktop/ltib/rpm/BUILD/tslib-1.0/src/.libs/ -qt-sql-sqlite
If you get failure append -v on to the string. Do not install include /usr/include or /usr/lib or you will make Linux sad and get errors like invalid operand for code w
To cross-compile an app: add /usr/lpc3250-linux/local/qt-embedded-4.7.3/bin to PATH using export, once you’ve done that you can use
qmake
make
If you get an error, add :/home/vmplanet/Desktop/ltib/rpm/BUILD/tslib-1.0/src/.libs,-lrt to LFLAGS in the Makefile.
How to Enable the Touchscreen on Device
Check it works:
[root@nxp /]# cat /proc/bus/input/devices
I: Bus=0019 Vendor=0001 Product=0002 Version=0100
N: Name=”ts-lpc32xx”
P: Phys=lpc32xx/input0
S: Sysfs=/class/input/input0
U: Uniq=
H: Handlers=mouse0 event0
B: EV=b
B: KEY=400 0 0 0 0 0 0 0 0 0 0
B: ABS=3
Get the minor and major values for the module
cat /sys/class/input/input0/event0/dev
13:64
Create a device node for it
mknod /dev/input/event0 c 13 64
Setup the environment:
[root@nxp /]# export TSLIB_TSDEVICE=/dev/input/event0
[root@nxp /]# export TSLIB_CALIBFILE=/etc/pointercal
[root@nxp /]# export TSLIB_CONFILE=/etc/ts.conf
Add the following to /etc/ts.conf
module_raw input raw
module pthres pmin=1
module variance delta=100
module dejitter delta=10
module linear
Run ts_calibrate and touch the screen. Bask in the touchy goodness.
This should be rolled into your /etc/rc.local file or saved permanently in the rootfs.jffs generated by ltib.
Installing Qt
Once you have a cross-compiled qt build. Tar it all up, copy it across and extract into your system.
cd /lib
tar zxvf /mnt/mmc/qt.tar.gz
mv /lib/qt-embedded-4.7.3/lib/* /lib/
Using vi you will want to append the various settings required to make Qt work on an embedded platform so edit /etc/rc.S/rc.local
echo “Setting variables”
export TSLIB_TSDEVICE=/dev/input/event0
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFILE=/etc/ts.conf
export QT_QWS_FONTDIR=/lib/fonts/
export QWS_MOUSE_PROTO=tslib:/dev/input/event0
echo “Running Demo”
cd /
/<your_exe_here> -qws &
Please Log in or Create an account to join the conversation.
Time to create page: 0.398 seconds