Establishment of arm-linux-qt environment

Publisher:BlissfulWhisperLatest update time:2016-08-03 Source: eefocusKeywords:arm  linux  qt Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Establishment of Arm-Linux Embedded QT/E Environment (qt/e 3.x series)

The QT/E 3.x series has been greatly improved over the QT/E 2.x series, greatly improving the development progress. It no longer uses tmake, and the installation is also simpler. However, there are still relatively few introductions to the QT/E 3.x series on the Internet,
so this article introduces the installation of the QT/E 3.x series.
1. Establish an arm cross-compilation tool chain
    Before installing QT/E, you should ensure that the arm-linux cross-compilation tool chain has been established. If it has not been established, you can refer to the following steps to establish it.
    1. Download the cross-compilation tool cross-2.95.3.tar.bz2 (or other versions such as: cross-3.4.4.tar.bz2). This is the arm cross-compilation tool chain that has been made. You only need to unzip it and establish the environment variables to use it.
    2. Copy the file cross-2.95.3.tar.bz2 to a folder. Here I use: /usr/local/arm. Note that you must correspond to it when establishing the environment variables later.
    3. Unzip tar -xjvf cross-2.95.3.tar.bz2
    4. Create environment variables Copy the content to the clipboard Code:
export PATH=/usr/local/arm/2.95.3/bin:$PATH Or you can write it into the file ~/.bashrc, so you don't have to export it every time you start the computer. Copy the content to the clipboard Code:
             vi ~/.bashrc
             Add export PATH=/usr/local/arm/2.95.3/bin:$PATH at the end. The arm-linux cross-compilation tool chain has been built.
2. Compile QT
        1. QT/E free version can be downloaded from the official website ftp. The website is: ftp://ftp.trolltech.com/qt/source/  . You can choose a version to download. I personally think that QT/E 3.x series is easier to use,
but there is more information on QT/E 2.x series on the Internet. But it is recommended not to use the qt/e 3.3.x version, because in the process of my development, I have tried qt/e 3.3.4 and qt/e3.3.8, and found that they occupy a
very high CPU resource on the ARM development board, and have been occupying about 98% of the CPU. Now I have not found the reason. I wonder if any friends have encountered this problem. It is recommended to use the qt/e 3.1.0 version. I am using it and have not encountered any problems.
(Note: The problem has been solved. It turned out that the keyboard interface was not done well. I will share the process of transplanting the keyboard interface with you when I have time) 
         2. Here, I assume that qt-embedded-free-3.1.0.tar.bz2 is used 
         3. Copy the file qt-embedded-free-3.1.0.tar.bz2 to a folder. Here I use: /usr/local/arm. Note that it should correspond to it when you create the environment variable later.
         4. Unzip tar -xjvf qt-embedded-free-3.1.0.tar.bz2   
             and change the unzipped folder qt-embedded-free-3.1.0 to qte. (You don't have to change it, it's for convenience. Note that you have to correspond to it when you create environment variables later)   
                        mv qt-embedded-free-3.1.0 qte
         5. Create environment variables
                       vi ~/.bashrc
               and add the code to copy the content to the clipboard at the end:
                       export QTDIR=/usr/local/arm/qte
                       export QTEDIR=$QTDIR
                       export PATH=$QTDIR/bin:$PATH
                       export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH (Please log in again to make the environment variables take effect)
          6. Configure QT
            Enter the QT/E directory: cd $QTDIR
              Input: ./configure -embedded arm -thread -no-cups -qvfb -depths 4,8,16,32

            The above options: -embedded arm means the target platform is arm; -thread means support for qt threads, which I use in my development; -qvfb means support for the virtual buffer frame tool qvfb;
-depths 4,8,16,32 means support for 4, 8, 16, 32-bit display color depth. There are many more options that I will not list one by one, please check ./configure -help.
         In addition, there is an option I did not use, which is -qconfig local. You can write some switch variables into a file qconfig-local.h and put it under $QTDIR/src/tools.
You can refer to the qconfig-small.h, qconfig-medium.h, qconfig-large.h and other files in this directory, or use them directly, such as: -qconfig small. Through these switch variables,
some unnecessary components in development can be removed to reduce the size of the qt library. You need to be familiar with QT here, and beginners can ignore it for now.

            (I once encountered an error when compiling the $QTDIR/include/qvaluestack.h file at home. Later, I copied the corresponding file of qt3.3.8 and overwrote it, and it passed.
I guess it was incompatible with the gcc version. I have never encountered this problem in the company.)
         7. Compile
            make sub-src // Specify to compile the development package in a streamlined way, that is, some Qt classes are not compiled
.
          8. Test
                  At this point, the compilation work is completed. Finally, test whether it can be used normally. We can use the examples that come with QT to test, such as:
                  cd $QTDIR/examples/aclock // or you can create a new QT project
                  make clean // clear the original
                   rm *.pro Makefile // delete and re-create the project file
                   qmake -project
                    qmake -spec $QTDIR/mkspecs/qws/linux-arm-g++ -o Makefile           
                -spec specifies the configuration file of the target board. Here I am working on the linux arm platform. Note that here, $QTDIR/mkspecs/qws/linux-arm-g++ is not a compiler, but a configuration file,
and the compiler used for compilation is the compiler in the arm cross-compilation tool chain we established in the first step.  If
                   make                      
             does not make any mistakes, it means that your QT/E environment has been successfully established. If it says cannot find -lqte, then try to modify the Makefile file, find -lqte, change it to -lqte-mt
and make it again. It will usually work. This is because if QT threads are used or for some other reasons, the library it generates is no longer libqte.so.3.1.0, but libqte-mt.so.3.1.0, so it cannot be found.
3. Porting to the development board (the following are all in the target machine environment)
        1. Create a new directory, such as: /qt/lib. Enter this directory cd /qt/lib
        2. Download the Qt library file libqte-mt.so.3.1.0 generated above to the development board /qt/lib/directory through ftp. (Note: do not use wget to download, it will damage the library file,
resulting in errors such as ld.so: dynamic-link.h: 62: elf_get_dynamic_info: Assertion `! "bad dynamic         tag                 "                 '
... libqte-mt.so.3                 ln -s libqte-mt.so.3.1.0 libqte-mt.so.3.1         4. Create environment variables                        vi ~/.bashrc                and add the code to copy the content to the clipboard at the end:                        export QTDIR=/qt                        export QTEDIR=$QTDIR                        export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH4. The target board environment has been built. Now you can download the above example aclock to the target board and try to see if it can run!              Enter in the development board console: ./aclock -qws                If it can run but the keyboard cannot be used, it is normal because the interfaces of keyboard, mouse and other devices have not been added to QT/E. This cannot be explained in one or two sentences, so I will add it later! One more thing: If there is a prompt like this: "./aclock:error while loading shared libraries: libstdc++.so.6: cannot load shared object file: No such file or directory." You can find the corresponding library file in the /usr/local/arm/2.95.3/arm-linux/lib/directory in the arm cross-compilation tool chain we built in the first step and download it to the /lib directory of the development board. --












Keywords:arm  linux  qt Reference address:Establishment of arm-linux-qt environment

Previous article:Analyzing the startup process of STM32
Next article:ARM Advanced Learning (5) - ARM ISP Operation

Recommended ReadingLatest update time:2024-11-16 16:29

Design and analysis of dual-frequency RFID reading and writing system based on ARM
introduction In view of the most widely used radio frequency card and reader implementation method in the domestic market, this paper uses ARM embedded system as the microcontroller and designs a reader/writer module that can operate on two frequency RFID cards: low frequency 125KHz and high frequency 13.56MHz,
[Microcontroller]
Design and analysis of dual-frequency RFID reading and writing system based on ARM
Implementation and application of a reconfigurable FPGA configuration method based on ARM
With the rapid development of semiconductor process technology, the integration of field programmable logic devices (FPGAs) has increased rapidly and has reached the level of millions of gates. At the same time, the logic resources in FPGAs are becoming increasingly abundant, making FPGA-based system-on-ch
[Microcontroller]
Implementation and application of a reconfigurable FPGA configuration method based on ARM
Development and compilation of ARM bare board program (taking lighting up LED lamp as an example)
After making a cross-compilation tool chain, how do you determine whether it is effective? Of course, compile a program and burn it to the board and run it. Here we take lighting up an LED as an example to describe how to use the cross-compilation tool chain we made to compile a bare board program. First, you need t
[Microcontroller]
Development and compilation of ARM bare board program (taking lighting up LED lamp as an example)
Implementation of OLED display application system design based on ARM7 microprocessor LPC2138
With its powerful functions, extremely low power consumption, and smaller packages, ARM processors are widely used in small systems such as access control, wireless meter reading, and intelligent temperature control. In these systems, the human-computer interaction interface is generally completed by LCD, but Usually
[Microcontroller]
Implementation of OLED display application system design based on ARM7 microprocessor LPC2138
【ARM bare board】Nand Flash basics and timing analysis
1. Hardware knowledge 1.1 How to transmit address signals? DATA0 ~ DATA7 transmits both data and address (multiplexing) ALE (Address Lock Enable) address latch enable signal When ALE = 1, the address is transmitted When ALE = 0, data is transmitted 1.2 How to transmit commands? Command table According to the NAN
[Microcontroller]
【ARM bare board】Nand Flash basics and timing analysis
Design of DS18B20 driver for temperature sensor based on Linux
Introduction Traditional analog temperature measurement has poor anti-interference ability and large zero drift of the amplifier circuit, which leads to large measurement error and difficulty in achieving the required accuracy. In practical applications, the use of digital temperature sensors with strong anti-in
[Industrial Control]
Design of DS18B20 driver for temperature sensor based on Linux
Design of car radio frequency identification anti-theft system based on ARM
  This paper introduces the structure of a new generation of automobile anti-theft system based on radio frequency technology, and proposes a design scheme for an automobile radio frequency identification anti-theft system with ARM microprocessor as the core. The scheme gives the circuit diagram of the hardware and lo
[Microcontroller]
Design of car radio frequency identification anti-theft system based on ARM
Arm plans to cancel chip design license to Qualcomm, which may disrupt the smartphone/PC market
On October 23, Bloomberg reported today that Arm plans to cancel the license that allows its long-term partner Qualcomm to use Arm intellectual property to design chips. Documents obtained by Bloomberg show that Arm gave Qualcomm 60 days’ notice to cancel its architecture licensing agreement, which allows Qualc
[Mobile phone portable]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components
Guess you like

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号