RK3399- QT 5.11.3

From ESS-WIKI
Revision as of 12:39, 24 November 2021 by Xingxing.li (talk | contribs) (Created page with "=== '''1. Installing required packages''' === Please login and perform the following commands: <pre>$ sudo apt-get install -y build-essential $ sudo apt-get install -y qtcre...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

1. Installing required packages

Please login and perform the following commands:

$ sudo apt-get install -y build-essential 
$ sudo apt-get install -y qtcreator 
$ sudo apt-get install -y qt5-default 
$ sudo apt-get install -y qt5-doc 
$ sudo apt-get install -y qt5-doc-html qtbase5-doc-html 
$ sudo apt-get install -y qtbase5-examples 
$ sudo apt-get install -y qt5-qmake 
$ sudo apt-get install -y rsync
$ sudo apt-get install -y gcc-8-arm-linux-gnueabihf g++-8-arm-linux-gnueabihf
$ sudo apt-get install -y gcc-8-aarch64-linux-gnu g++-8-aarch64-linux-gnu

2。Installing cross toolchain(下载后必须解压到相应的路径,自己找的到也行)

 RK3399(Password: 0kkn) cross compiler toolchain first. Then execute the following command to unzip the cross compiler tool to the /opt directory

For RK3399

$ sudo rm -rf /opt/toolchain_Qt_V5.11.3/rk3399/ 
$ sudo mkdir -p /opt/toolchain_Qt_V5.11.3/rk3399/ 
$ sudo tar -zxvf rk3399_toolchain_Qt_V5.11.3_*.tar.gz -C <span style="color:#FF0000;">/opt/toolchain_Qt_V5.11.3/rk3399/</span>

3。打开QtCreator

$ qtcreator
  1. The QtCreator's main window shows up.
    RK3399 Qt start init.png
  2. Check QtCreator's version by using "Help" -> "About Qt Creator".
    RTENOTITLE

4.Configuring the Cross-Compiler Options

  1. Bring up the options dialog using "Tools" -> "Options..."
  2. Select the "Devices" page on the left, and click "Add..."
  3. Select "Generic Linux Device" and click "Start Wizard".
    RTENOTITLE

Specify proper settings and click "Next>"

  1. RTENOTITLE
  2. Click "Finish"
  3. Device test finished successfully. Click "Close".
    RTENOTITLE

    If device test failed, please go back to specify proper settings.
    RTENOTITLE
    (It is necessary to set a blank password at least, null password does not work.)

    RTENOTITLE
    (It means device's IP is incorrect or some network issues occured.)
  4. Click "Apply"
  5. Select the "Build & Run" page on the left, switch to "Compilers" tab, drop down "Add" menu and choose "GCC-->C++".

        编译器路径:/usr/bin/aarch64-linux-gnu-g++-8

        插一张路路径的图片

  1. Name the compiler as "RK G++"

          

  1. Click "Browse..." to select "/opt/rk3288_risc/buildroot/output/rockchip_rk3288/host/bin/arm-buildroot-linux-gnueabihf-g++"
  2. Click "Apply"
    RTENOTITLE
  3. Switch to the "Debuggers" tab
  4. Click "Add"
  5. Name the debugger as "RK GDB"
  6. Click "Browse..." to select "/opt/rk3288_risc/buildroot/output/rockchip_rk3288/host/bin/arm-buildroot-linux-gnueabihf-gdb"
  7. Click "Apply"
    RTENOTITLE
  8. Switch to the "Qt Versions" tab.
  9. Check if the "Qt 5.9.4 (host)" is auto detected in "Manual" item ?
    RTENOTITLE
    If not, click "Add..." to choose the proper qmake.
  10. Click "Apply"
  11. Switch to the "Kits" tab.
  12. Click "Add".
  13. Name the kit as "RK toolchain"
  14. Specify the correct "Device Tpye", "Compiler", "Debugger" and "Qt version"
  15. Click "Browse..." to select "/opt/rk3288_risc/buildroot/output/rockchip_rk3288/host/arm-buildroot-linux-gnueabihf/sysroot" as sysroot
  16. Click Apply
    RTENOTITLE
  17. Click OK to finalize the configuration.
  18. Invoke the options dialog again to make sure the "iMX6 toolchain" is default kit.