开发使用的是nuc972的芯片,使用的是串口屏,AD口控制触摸屏,移植触摸屏后,能正常使用,移植qt后能正常使用
但是打开:export QWS_MOUSE_PROTO="Tslib:/dev/input/event0"
运行/mnt # ./hello -qws
Segmentation fault
出现以上错误。
qt编译的配置为:
配置文件qmake.conf
include(../../common/linux.conf)
6 include(../../common/gcc-base-unix.conf)
7 include(../../common/g++-unix.conf)
8 include(../../common/qws.conf)
9
10 # modifications to g++.conf
11 QMAKE_CC = arm-linux-gcc
12 QMAKE_CXX = arm-linux-g++
13 QMAKE_LINK = arm-linux-g++
14 QMAKE_LINK_SHLIB = arm-linux-g++
15
16 # modifications to linux.conf
17 QMAKE_AR = arm-linux-ar cqs
18 QMAKE_OBJCOPY = arm-linux-objcopy
19 QMAKE_STRIP = arm-linux-strip
20
21 # Support static build.
22 QMAKE_LFLAGS = -static
23
24 # Reduce code size.
25 QMAKE_CFLAGS_RELEASE = -Os
26 QMAKE_CXXFLAGS_RELEASE = -Os
27
28 # Include/library path for tslib
29 QMAKE_INCDIR = /usr/local/arm_linux_4.8/usr/include
30 QMAKE_LIBDIR = /usr/local/arm_linux_4.8/usr/lib
配置configure配置configure:
./configure \
-prefix /home/zhang/test/qt4.8.5 \
-release \
-opensource \
-static \
-qconfig dist \
-no-exceptions \
-no-accessibility \
-no-stl \
-no-qt3support \
-no-xmlpatterns \
-no-multimedia \
-no-audio-backend \
-no-phonon \
-no-phonon-backend \
-no-svg \
-no-webkit \
-no-javascript-jit \
-no-script \
-no-scripttools \
-no-declarative \
-no-declarative-debug \
-qt-zlib \
-qt-freetype \
-no-gif \
-qt-libpng \
-no-libmng \
-no-libtiff \
-qt-libjpeg \
-no-openssl \
-nomake tools \
-nomake demos \
-nomake examples \
-nomake docs \
-nomake translations \
-no-nis \
-no-cups \
-no-iconv \
-no-pch \
-no-dbus \
-embedded arm \
-platform qws/linux-x86-g++ \
-xplatform qws/linux-nuc970-g++ \
-no-gtkstyle \
-no-nas-sound \
-no-opengl \
-no-openvg \
-no-sm \
-no-xshape \
-no-xvideo \
-no-xsync \
-no-xinerama \
-no-xcursor \
-no-xfixes \
-no-xrandr \
-no-xrender \
-no-mitshm \
-no-fontconfig \
-no-xinput \
-no-xkb \
-no-glib \
-qt-gfx-linuxfb \
-qt-mouse-tslib \
-qt-kbd-linuxinput
将编译后的lib库放入到板子的usr/qt/下,运行编译后的 程序,
在板子上能正常显示,前提是注释掉:
# export QWS_MOUSE_PROTO="Tslib:/dev/input/event0"
tslib移植后,也能正常使用,
触摸屏的校准和测试,没有出现问题,能正常使用。
/etc/profile的设置为:
export QTDIR=/usr/qt/lib
export TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_PLUGINDIR=/lib/ts
export TSLIB_TSDEVICE=/dev/input/event0
export TSLIB_CALIBFILE="/etc/pointercal"
export TSLIB_CONSOLEDEVICE="none"
export LD_LIBRARY_PATH=/lib:$QTDIR:$LD_LIBRARY_PATH
export QT_QWS_FONTDIR=$QTDIR/fonts/
export QWS_SIZE=800x480
export QWS_DISPLAY="LinuxFb:mmWidth80:mmHeight160:0"
export QT_PLUGIN_PATH=$QTDIR/plugins/
export POINTERCAL_FILE=/etc/pointercal
#export QWS_KEYBOARD="TTY:/dev/tty5"
export QWS_MOUSE_PROTO=Tslib:/dev/input/event0
export PATH=/bin:$PATH
ts.conf的配置为:
module_raw input
module pthres pmin=1
module variance delta=30
module dejitter delta=100
module linear
全部都顶格
现在查询过网上的方法:
export QWS_MOUSE_PROTO=Tslib:/dev/input/event0
#export QWS_MOUSE_PROTO="Intellimouse:/dev/input/mouse0"
注释到上面一句,用下面这句,触摸屏可用,不报错,但是指针出现漂移的现象,应该没校准,然后查询发现
因为触摸屏用到了event0和mouse0两个接口,但是我们实际要用的是event0的接口,所以不能去掉他。
现在的问题就是去掉event0,换上mouse0能用,但是指针漂移,不能校准
用上event0的时候,运行qt程序会报egmentation fault
求各位大神指导,是哪块配置错误,还是说内核中缺少该添加的东西,或者有详细的步骤,供参考的。
|