We need to develop a simple QT program and download it to the arm Development Board. Here we need to introduce several software used: X86-qtopia, This Is A qtopia under the PC, he has a simulator, can simulate the appearance of the arm Development Board. Easy debugging Arm-qtopia, which is mainly used for compilation, because to download to the Development Board, the library file of qtopia of the arm version is required. After compilation, it is directly downloaded to the Development Board for running. The above two qtopics must be compiled in advance. Buildhost. sh, which is the script for compiling the QT program under x86. Buildarm. sh. This is the compilation script under arm. 1. Develop the QT program and directly use the designer /Opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qt2/bin/designer main_form_base.ui Use the designer in x86 to design the graphic interface and name it main_form_base.ui. Here, the QT programming process is omitted .................................. ...... 2. After programming, execute the buildhost. sh script and compile it to generate executable files. Script content: Certificate ----------------------------------------------------------------------------------------------------------------------------------------- #! /Bin/sh Source/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/setQpeEnv Qmake-o Makefile. host-spec qws/linux-generic-g ++ *. pro Make-f Makefile. host clean Make-f Makefile. host Certificate ------------------------------------------------------------------------------------------------------------------------------------------ 3, and then to the x86-qtopia directory, run the simulator. A qtopia interface is displayed. 4. Run the compiled executable file (here a corresponding run_x86_mycalc script is required ). If the software interface we wrote appears in the simulator and runs properly, it means no problem. You can proceed directly to the next step. Run_x86_mycalc script: Certificate ----------------------------------------------------------------------------------------------------------------------------------------- # Cd/opt/FriendlyArm/mini2440/x86-qtopia/mycalc (mycalc program directory) # Export QTDIR =/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/image/opt/Qtopia/ # Export QPEDIR =/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/image/opt/Qtopia/ # Export HOME = $ QPEDIR/root/ # Export LD_LIBRARY_PATH = $ QPEDIR/lib: $ LD_LIBARAY_PATH #./Mycalc Certificate ----------------------------------------------------------------------------------------------------------------------------------------- 5. Execute the buildarm. sh script and compile it to generate an executable file of the arm version. Script content: Certificate ----------------------------------------------------------------------------------------------------------------------------------------- #! /Bin/sh Source/opt/FriendlyARM/mini2440/arm-qtopia/qtopia-2.2.0-FriendlyARM/setQpeEnv Qmake-o Makefile. arm-spec qws/linux-generic-g ++ *. pro Make-f Makefile. arm clean Make-f Makefile. arm Certificate ----------------------------------------------------------------------------------------------------------------------------------------- 6. Copy the executable file to the/opt/qtopia/bin directory on the arm Development Board (transmitted through the serial port of the Super Terminal) 7. Compile run_mycalc to execute the script. (The run_mycalc name can be changed here) In the/bin directory on the arm Development Board, VI run_mycalc Content: Certificate ----------------------------------------------------------------------------------------------------------------------------------------- #! /Bin/sh Export tslib_tsdevice =/dev/touchscreen-1wire Export tslib_conffile =/etc/ts. conf Export tslib_plugindir =/usr/lib/TS Export tslib_calibfile =/etc/pointercal Export qtdir =/opt/qtopia Export qpedir =/opt/qtopia Export Path = $ qtdir/bin: $ path Export LD_LIBRARY_PATH = $ qtdir/lib:/usr/local/lib: $ LD_LIBRARY_PATH Export QWS_MOUSE_PROTO = "TPanel:/dev/input/mice" Export QWS_KEYBOARD = TTY:/dev/tty1 Export HOME =/root Exec $ QPEDIR/bin/qpe (Change qpe to the name of the executable program stored in/opt/Qtopia/bin. Change it to mycalc here) Certificate ----------------------------------------------------------------------------------------------------------------------------------------- 8. Run run_mycalc directly. |