Results 1 to 2 of 2

Thread: Illegal Instruction on Mini2440 With Qt 4.7.4

  1. #1
    Join Date
    Jul 2011
    Posts
    14
    Thanks
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Illegal Instruction on Mini2440 With Qt 4.7.4

    I had an application which runs on qt everywhere 4.6.1, on mini2440 test-env and I'm using Ubuntu 11.10 32-bit as dev-env. Then my computer crashed and I need to prepare a new development environment. In arm side I have embeedded qt tslib etc. In my pc, I downloaded and installed qt-4.7.4 and tslib. The steps I took are the same as http://www.sereno-labs.com/qt-4-6-2-...ini-2440-board

    I'm using arm-linux-gcc-4.3.2 as toolchain, I've extracted it to /home/QT/crosscompiler and export path relatively. I changed mkspecs/qws/linux-arm-g++/qmake.conf file as it says on the page. I added QMAKE_LFLAGS += -Wl,-rpath-link=/home/QT/tslib-arm/arm/lib line because I got ts* errors. (I installed tslib to /home/QT/tslib-arm/ by the way.)

    Then modified /mkspecs/common/g++.conf to overcome optimization thing, same as the tutor says.

    I configure'd, make'd and make install'ed in the same way.

    I've copied libQtCore.so.4, libQtGui.so.4, libQtNetwork.so.4 and libQtSvg.so.4 to /usr/local/Trolltech/QtEmbedded-4.7.4-arm/lib at mini2440. Copied font directory to the lib directory.
    I did NOT modified anything about tslib on the arm side.

    Let me tell you about my project's configure and make stages.
    I called /usr/bin/qmake-qt4 MobilHM.pro -spec /usr/share/qt4/mkspecs/qws/linux-arm-g++ -r in project directory.

    Then made some changes on Makefile, because I don't know how to set them in the beginning.
    I changed,
    INCPATH = -I/usr/share/qt4/mkspecs/qws/linux-arm-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -Ibasicgraph -I. -I.
    to
    INCPATH = -I/usr/share/qt4/mkspecs/qws/linux-arm-g++ -I. -I/home/QT/qt-everywhere-opensource-src-4.7.4/include/QtCore -I/home/QT/qt-everywhere-opensource-src-4.7.4/include/QtNetwork -I/home/QT/qt-everywhere-opensource-src-4.7.4/include/QtGui -I/home/QT/qt-everywhere-opensource-src-4.7.4/include/QtSvg -I/home/QT/qt-everywhere-opensource-src-4.7.4/include -I. -Ibasicgraph -I. -I.

    and changed
    LIBS = $(SUBLIBS) -L/usr/lib/i386-linux-gnu -lQtGui -lQtNetwork -lQtCore -lpthread
    to
    LIBS = $(SUBLIBS) -L/home/QT/tslib-arm/arm/lib -L/home/QT/qt-everywhere-opensource-src-4.7.4/lib -lQtSvg -lQtGui -lQtNetwork -lQtCore -lpthread

    Then I called make, after then I copied this executable to my board and called a script that was executing correctly before I migrated from 4.6.1 to 4.7.4. Th script is:
    #!/bin/sh
    export TSLIB_TSEVENTTYPE=INPUT
    export TSLIB_FBDEVICE=/dev/fb0
    export TSLIB_TSDEVICE=/dev/input/event0
    export TSLIB_CONFFILE=/usr/local/etc/ts.conf
    export TSLIB_PLUGINDIR=/usr/local/lib/ts
    export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/Trolltech/QtEmbedded-4.7.4-arm/lib:$LD_LIBRARY_PATH
    export QT_QWS_FONTDIR=/usr/local/Trolltech/QtEmbedded-4.7.4-arm/lib/fonts

    if [ ! -c $TSLIB_TSDEVICE ]; then
    echo "Creating $TSLIB_TSDEVICE..."
    mknod $TSLIB_TSDEVICE c 13 65
    fi
    if [ ! -c /dev/input/mice ]; then
    echo "Creating /dev/input/mice..."
    mknod /dev/input/mice c 13 32
    fi

    export TSLIB_CONSOLEDEVICE=none
    export QWS_MOUSE_PROTO=tslib:$TSLIB_TSDEVICE
    cd /home/MobilHM/; ./MobilHM -qws

    The only change in the script is /usr/local/Trolltech/QtEmbedded-4.7.4-arm was /usr/local/Trolltech/QtEmbedded-4.6.1-arm before.

    when I called ./MyScript I'm getting "Illegal Instruction"

    If anything more that you need to know tell me. By the way I've tried arm-2011.03-41-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 as toolchain with no luck, same problem, so I tried another one(arm-linux-gcc-4.3.2) but I'm getting same problem still. Where can be the problem?

  2. #2
    Join Date
    Jul 2011
    Posts
    14
    Thanks
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Illegal Instruction on Mini2440 With Qt 4.7.4

    Thank you for your help guys. I'm done with it, the solution is changing mkspecs/qws/linux-arm-g++/qmake.conf like this:

    QMAKE_CC = arm-none-linux-gnueabi-gcc -msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t -O0
    QMAKE_CXX = arm-none-linux-gnueabi-g++ -msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t -O0
    QMAKE_LINK = arm-none-linux-gnueabi-g++ -msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t -O0
    QMAKE_LINK_SHLIB= arm-none-linux-gnueabi-g++ -msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t -O0

Similar Threads

  1. QTCreator in Mini2440
    By marcio in forum Qt for Embedded and Mobile
    Replies: 4
    Last Post: 29th October 2012, 09:02
  2. Illegal instruction (Signal SIGILL) for QSqlQuery
    By yannifan in forum Qt Programming
    Replies: 7
    Last Post: 20th August 2011, 19:21
  3. Qt Embedded Graphic Development mini2440 ,sbc
    By wujianwen in forum Qt Tools
    Replies: 0
    Last Post: 9th October 2010, 08:40
  4. XML processing instruction
    By mattia in forum Newbie
    Replies: 1
    Last Post: 26th February 2008, 11:37

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.