DM365 touchscreen with Qt
From Texas Instruments Embedded Processors Wiki
Contents |
Equipment Needed
- Altera USB Blaster (if the DM365 EVM is Rev. E or earlier)
Prerequisites
This guide assumes you have succesfully set up the LCD with the DM365 according to the getting started guide in the download section of Avnet's DM365 AIB.
It also assumes you have completed the steps in the DM365 Getting Started Guide.
Testing the LCD With the DVSDK
Patching the Kernel
Some modifications need to be made to the kernel provided with the DaVinci LSP to enable LCD and touchscreen functionality.
- Download the patches from the download section of Avnet's DM365 AIB.
- Follow the instructions in teh README provided with the patches.
- After compiling the kernel, make sure you have copied the new uImage to your TFTP directory (i.e. /tftpboot).
Install the Test Binaries
- Download the test binaries from the download section of Avnet's DM365 AIB.
- Untar the tar.gz file in the root directory of your target filesystem. This will install files in the following directories:
/bin - files will be named ts_*; these are the touchscreen tests /disptest - contains files for running the display tests /etc - contains ts.conf /include - contains tslib.h /lib - files containing touchscreen libraries /root - contains .profile; this includes environment variables needed for touchscreen support
Running the Demos
- If you haven't already, grab the teraterm macro from the download section of Avnet's DM365 AIB.
- Modify the following lines as appropriate in the teraterm macro:
sendln "setenv bootfile uImage-dm365" sendln "setenv ipaddr 192.157.144.93" sendln "setenv serverip 192.157.144.96"
- For NFS boot, also modify
sendln "setenv rootpath /home/user/workdir/dm365"
- From teraterm, run the following commands for NFS boot:
# run makenfsboot # boot
- Once Linux has booted on the target, test the LCD display:
# cd /disptest # ./disp_images.sh
- Test the touchscreen:
# ts_calibrate # ts_test
Installing the Qt Demos
This section closely follows Building Qt for ARM only devices.
- Download Qt from here. Grab the "Framework Only" version (not the "Complete Development Environment").
- Untar the download somewhere in your filesystem:
$ tar xzf qt-everywhere-opensource-src-4.6.0.tar.gz
- Create a copy of the directory containing qmake.conf for ARM:
cp -R [qt-install-dir]/mkspecs/qws/linux-arm-g++/ [qt-install-dir]/mkspecs/qws/linux-dm365-g++/
- Modify the file mkspecs/qws/linux-omapl1-g++/qmake.conf appropriately. Make sure to include the correct paths for QMAKE_INCDIR and QMAKE_LIBDIR to ensure touchscreen support. For example:
# # qmake configuration for building with arm-linux-g++ # include(../../common/g++.conf) include(../../common/linux.conf) include(../../common/qws.conf) # modifications to g++.conf QMAKE_CC = arm_v5t_le-gcc QMAKE_CXX = arm_v5t_le-g++ QMAKE_LINK = arm_v5t_le-g++ QMAKE_LINK_SHLIB = arm_v5t_le-g++ #modifications to include ts-lib QMAKE_INCDIR = /home/user/workdir/dm365/usr/include QMAKE_LIBDIR = /home/user/workdir/dm365/lib # modifications to linux.conf QMAKE_AR = arm_v5t_le-ar cqs QMAKE_OBJCOPY = arm_v5t_le-objcopy QMAKE_STRIP = arm_v5t_le-strip load(qt_config)
- Run the configure script with the following options (prefix should point to the path where qt-embedded will be installed on the root filesystem):
$ ./configure -prefix /opt/qt-embedded -embedded arm -platform /qws/linux-x86-g++ -xplatform /qws/linux-dm365-g++ -depths 16,24,32 -no-cups \ -no-largefile -no-accessibility -no-openssl -qt-mouse-pc -qt-mouse-linuxtp -qt-mouse-linuxinput -plugin-mouse-linuxtp -plugin-mouse-pc –fast -qt-mouse-tslib
- Compile and install (This can take a long time)
$ gmake $ gmake install
- Add the following lines to the /root/.profile file on the target
export QWS_MOUSE_PROTO=tslib:/dev/input/event0 export QWS_DISPLAY=LinuxFb:/dev/fb2
Running the Qt Demos
- Boot the board using the teraterm macro as described before
- Once booted, use the following commands to run a demo (It is assumed you installed qt-embedded in the /opt/qt-embedded directory:
# export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:/opt/qt-embedded/lib # ./<Demo Name> -qws
Leave a Comment

