Difference between revisions of "IoTGateway/BSP/Linux"

From ESS-WIKI
Jump to: navigation, search
(kylinos QT)
Line 1: Line 1:
  
{{DISPLAYTITLE:Linux BSP}}
+
= Preface =
  
= '''i.MX6''' =
+
Qt has many versions, and may run on defferent OSs.But the toolchain we provide can fit them well.
  
=== '''RISC Image Naming Rule''' ===
+
It has the following advantages:
  
*[[RISC_Image_Naming_Rule|<span style="color:#336699">RISC Image Naming Rule</span>]]
+
*The compilation environment is consistent with runtime environment.
 +
*Good compatibility.
 +
*Good extensibility.
  
=== '''Technical Specification''' ===
+
So the application compiled by the toolchain can run perfectly on our products. And the toolchain can be used on Debian or Ubuntu Desktop Operating System well.
  
*[[IoTGateway/BSP/Linux/iMX6/Technical_Specification|Technical Specification]]
+
If you meet any problems, please do not hesitate to contact Advantech for help.
  
=== '''OS support list (Get BSP & image)''' ===
+
= Prerequisites =
  
*[[IoTGateway/BSP/Linux/iMX6/OS_Support_List|OS Support List(based on Yocto 1.5~Yocto 2.0)]]
+
<span style="color:#FF0000;">Debian10(buster) is highly recommended OS to develop.</span>
*[[IoTGateway/BSP/Linux/iMX6/OS_Support_List_new|OS Support List(based on Yocto 2.1 and later)]]
 
*[[IoTGateway/BSP/Linux/iMX6/OS_Support_List_Yocto_2.5|OS Support List(based on Yocto 2.5)]]
 
*[[IoTGateway/BSP/Linux/iMX6/OS_Support_List_Yocto_3.3_release|OS Support List release(based on Yocto 3.3)]]
 
*[http://ess-wiki.advantech.com.tw/view/AIM-Linux/BSP/NXP/Linux_Yocto_OS_Release_note/Yocto4.0/Internal OS Support List release(based on Yocto 4.0)]
 
*[[IoTGateway/BSP/Linux/iMX6/DDR_Support_List|DDR Support List]]
 
  
=== '''User Guide''' ===
+
== Installing required packages ==
  
*[[IoTGateway/BSP/Linux/iMX6/Yocto_LBV3_User_Guide|Version 3 (based on Yocto 1.5) User Guide]]
+
Please login and perform the following commands:
**[[IoTGateway/BSP/Linux/iMX6/Eclipse_Plug-in|Eclipse Plug-in]]
+
<pre>$ sudo apt-get install -y build-essential
**[[IoTGateway/BSP/Linux/iMX6/QtCreator|QtCreator]] 
+
$ sudo apt-get install -y qtcreator
*[[IoTGateway/BSP/Linux/iMX6/Yocto_LBV5_User_Guide|Version 5 (based on Yocto 1.7) User Guide]]
+
$ sudo apt-get install -y qt5-default
*[[IoTGateway/BSP/Linux/iMX6/Yocto_LBV6_User_Guide|Version 6 (based on Yocto 1.8) User Guide]]
+
$ sudo apt-get install -y qt5-doc
**[[IoTGateway/BSP/Linux/iMX6/Bluetooth_Testing_Guide|Bluetooth Testing Guide]] 
+
$ sudo apt-get install -y qt5-doc-html qtbase5-doc-html
*[[IoTGateway/BSP/Linux/iMX6/Yocto_LBV7_User_Guide|Version 7 (based on Yocto 2.0) User Guide]]
+
$ sudo apt-get install -y qtbase5-examples
*​[[IoTGateway/BSP/Linux/iMX6/Yocto_LBV8_User_Guide|Version 8 (based on Yocto 2.1) User Guide]]
+
$ sudo apt-get install -y qt5-qmake
*​[[IoTGateway/BSP/Linux/iMX6/Yocto_LBVB_User_Guide|Version B (based on Yocto 3.3) User Guide]]
+
$ sudo apt-get install -y rsync
*​[[IoTGateway/BSP/Linux/iMX6/Yocto_LBVC_User_Guide|Version C (based on Yocto 4.0) User Guide]]
+
$ sudo apt-get install -y gcc-8-arm-linux-gnueabihf g++-8-arm-linux-gnueabihf
**[[IoTGateway/BSP/Linux/iMX6/InstallDocker|How to install Docker on i.MX6 Debian]] 
+
$ sudo apt-get install -y gcc-8-aarch64-linux-gnu g++-8-aarch64-linux-gnu
*[[IoTGateway/BSP/Linux/iMX6/Mfgtool|Mfgtool]]
+
</pre>
  
=== FAQ ===
+
Link arm-linux-gnu*-8 to arm-linux-gnu* and aarch64-linux-gnu*-8 to aarch64-linux-gnu*:
 +
<pre>$ sudo su
 +
$ cd /usr/bin
 +
$ for f in $(ls arm-linux-gnu*-8);do ln -sf $f $(echo $f|sed "s/-8//");done
 +
$ for f in $(ls aarch64-linux-gnu*-8);do ln -sf $f $(echo $f|sed "s/-8//");done
 +
$ exit
  
*[[IoTGateway/BSP/Linux/iMX6/FAQ|FAQ]]
+
</pre>
  
= i.MX7 =
+
&nbsp;
  
=== [[IoTGateway/BSP/Linux/iMX7/OS_Support_List_new|OS Support List(based on Yocto 2.1 and later)]] ===
+
== Installing cross toolchain ==
  
=== [[IoTGateway/BSP/Linux/iMX7/Yocto_LBV8_User_Guide|Version 8 (based on Yocto 2.1) User Guide]] ===
+
Please download cross compiler toolchain first.
  
= '''i.MX8''' =
+
[https://pan.baidu.com/s/1JnXJ_X_HRDWoB14VBIq9fA RK3288](Password: gm9i)
  
=== '''OS support (get BSP & image)''' ===
+
[https://pan.baidu.com/s/1OEzbJsgBSo3n5DdwRY2Rag RK3399](Password: 0kkn)
  
*[[IoTGateway/BSP/Linux/iMX8/OS_Support_List|OS Support List(based on Yocto 2.5 and later)]]
+
[https://pan.baidu.com/s/17hCuIcORYDPOSAqVoyPPrg RK3568](Password: a887)
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/iMX8/OS_Support_List_3.0 OS Support List(based on Yocto 3.0)]  
 
*[[IoTGateway/BSP/Linux/iMX8/OS_Support_List_3.3_release|OS Support List release(based on Yocto 3.3)]]
 
  
*[http://ess-wiki.advantech.com.tw/view/AIM-Linux/BSP/NXP/Linux_Yocto_OS_Release_note/Yocto2.5/Internal New OS Support List(based on Yocto 2.5)]  
+
[https://pan.baidu.com/s/1KWoDVtQhAEJTi_1GiAcC0A RK3588](Password: a887)
*[http://ess-wiki.advantech.com.tw/view/AIM-Linux/BSP/NXP/Linux_Yocto_OS_Release_note/Yocto3.0/Internal New OS Support List(based on Yocto 3.0)]
 
*[http://ess-wiki.advantech.com.tw/view/AIM-Linux/BSP/NXP/Linux_Yocto_OS_Release_note/Yocto4.0/Internal New OS Support List(based on Yocto 4.0]
 
*[http://ess-wiki.advantech.com.tw/view/AIM-Linux/BSP/NXP/Linux_Yocto_OS_Release_note/Yocto4.2/Internal New OS Support List(based on Yocto 4.2)]
 
  
=== '''User Guide''' ===
+
Then execute the following command to unzip the cross compiler tool to the /opt directory
  
*[[IoTGateway/BSP/Linux/iMX8/Yocto_LBV9_User_Guide|Version 9 (based on Yocto 2.5) User Guide]]
+
For RK3288
*[[IoTGateway/BSP/Linux/iMX8/Qt5Creator|Qt5Creator]]
+
<pre>$ sudo rm -rf /opt/toolchain_Qt_V5.11.3/rk3288/
*[[IoTGateway/BSP/Linux/iMX8/Yocto_LBVA_User_Guide|Version A (based on Yocto 3.0) User Guide]]
+
$ sudo mkdir -p /opt/toolchain_Qt_V5.11.3/rk3288/
*[[IoTGateway/BSP/Linux/iMX8/Yocto_LBVB_User_Guide|Version B (based on Yocto 3.3) User Guide]]
+
$ sudo tar -zxf rk3288_toolchain_Qt_V5.11.3_*.tar.gz -C /opt/toolchain_Qt_V5.11.3/rk3288/
*[[IoTGateway/BSP/Linux/iMX8/Yocto_LBVC_User_Guide|Version C (based on Yocto 4.0) User Guide]]
+
</pre>
*[[IoTGateway/BSP/Linux/iMX8/Yocto_LBVD_User_Guide|Version D (based on Yocto 4.2) User Guide]]
 
*[[IoTGateway/BSP/Linux/iMX8/Build_Instructions|Build Instructions]]
 
*Debian​
 
**[[IoTGateway/BSP/Linux/Debian/How_to_Create_Debian10_Rootfs_Base|How to create Debian 10 rootfs base]]
 
**[[IoTGateway/BSP/Linux/Debian/How_to_create_Debian10_SDcard_image|How to create Debian 10 SD card image]]
 
  
=== [[IoTGateway/BSP/Linux/iMX8/FAQ|FAQ]] ===
+
For RK3399
 +
<pre>$ 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 /opt/toolchain_Qt_V5.11.3/rk3399/
 +
</pre>
  
= '''NXP i.MX eIQ Machine Learning''' =
+
For RK3568
 +
<pre>$ sudo rm -rf /opt/toolchain_Qt_V5.11.3/rk3568/
 +
$ sudo mkdir -p /opt/toolchain_Qt_V5.11.3/rk3568/
 +
$ sudo tar -zxf rk3568_toolchain_Qt_V5.11.3_*.tar.gz -C /opt/toolchain_Qt_V5.11.3/rk3568/</pre>
  
*[[NXP eIQ|NXP eIQ]]
+
For RK3588
 +
<pre>$ sudo rm -rf /opt/toolchain_Qt_V5.15.2/rk3588/
 +
$ sudo mkdir -p /opt/toolchain_Qt_V5.15.2/rk3588/
 +
$ sudo tar -zxf rk3588_toolchain_Qt_V5.15.2_*.tar.gz -C /opt/toolchain_Qt_V5.15.2/rk3588/</pre>
  
= Quark =
+
= Working within QtCreator =
  
=== '''OS support list''' ===
+
The following example is test on QT5.9.5(qmake version) of Ubuntu18.04.There may be a few differences on other operating system,but the main steps are the same.
  
*[[IoTGateway/BSP/Linux/Quark/OS_Support_List|OS Support List]]
+
Use qtcreator to configure a complete build kit.
  
=== '''User Guide''' ===
+
== Config QtCreator ---- Qt Versions ==
  
*[[IoTGateway/BSP/Linux/Quark/Yocto_LBV1_User_Guide|Version 1 User Guide]]
+
1. Select Tools --> options -->&nbsp;
  
:This version is based on Intel Quark BSP v1.0.4 (Yocto 1.4.2).  
+
[[File:QtDNK5.png|RTENOTITLE]]
  
*[[IoTGateway/BSP/Linux/Quark/Yocto_LBV2_User_Guide|Version 2 User Guide]]
+
2. Select Qt versions --> Manual -->Add -->
  
:This version is based on Intel Quark BSP v1.2.0 (Yocto 1.7.2).
+
&nbsp; &nbsp; Path:/opt/toolchain_Qt_V5.11.3/<span style="color:#FF0000;">'''RK3568 or&nbsp;RK3399 or RK3288'''</span><span style="color:#000000;">/sysroot/qmake</span>
<ul style="margin-left: 40px;">
 
<li>[[IoTGateway/BSP/Linux/Quark/Bluetooth_Testing_Guide|Bluetooth Testing Guide]]</li>
 
<li>[[IoTGateway/BSP/Linux/Quark/Getting_BSP_from_GitHub|Getting the BSP from GitHub]]</li>
 
</ul>
 
  
:
+
&nbsp; &nbsp; Path:/opt/toolchain_Qt_V5.15.2/<span style="color:#FF0000;">'''RK3588'''</span><span style="color:#000000;">/sysroot/qmake</span>
::There is a [[IoTGateway/BSP/Linux/Quark/Getting_BSP_from_GitHub#Supported_version|newer version]] which is based on Intel Quark BSP v1.2.1.1 (Yocto 1.7.2). 
 
  
*[[IoTGateway/BSP/Linux/Quark/BuildingDebianJessieRootfs|Building Debian (Jessie) Rootfs for Quark]]  
+
[[File:QtICMN.png|RTENOTITLE]]
  
=== '''FAQ''' ===
+
[[File:QtLZHW4.png|RTENOTITLE]]
  
*[[IoTGateway/BSP/Linux/Quark/FAQ|FAQ]]
+
== Config QtCreator ---- Qt Complers ==
  
= APQ8016 =
+
1. Select compilers -->
  
=== [[IoTGateway/BSP/Linux/APQ8016/OS_Support_List|OS Support List]] ===
+
2. Because Gcc and G++ has been installed earlier, the compiler will generally detect it automatically.
  
=== Linux BSP User Guide ===
+
&nbsp; &nbsp; If no Auto-detected, just Add it.
  
*[[IoTGateway/BSP/Linux/APQ8016/BSP_User_Guide_V1|Version 1 (Yocto 2.1 & Debian 9)]]
+
<span style="color:#000000;">'''Path for'''</span><span style="color:#ff0000;">'''RK3588 (64)'''</span><span style="color:#000000;">:/usr/bin/arrch64-linux-gnu-gcc&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span>
  
=== [[IoTGateway/BSP/Linux/APQ8016/FAQ|FAQ]] ===
+
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/usr/bin/aarch64-linux-gnu-g++
  
= '''AM335x''' =
+
<span style="color:#000000;">'''Path for'''</span><span style="color:#ff0000;">'''RK3568 (64)'''</span><span style="color:#000000;">:/usr/bin/arrch64-linux-gnu-gcc&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span>
  
=== '''Support List (Get BSP & image)''' ===
+
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/usr/bin/aarch64-linux-gnu-g++
  
*[[IoTGateway/BSP/Linux/AM335x/OS_Support_List|<font color="#0066cc">OS Support List(base on ti-skd-am335x-evm-06.00.00.00 and ti-sdk-am335x-evm-02.00.00.00.00)</font>]]
+
&nbsp;
*[[OS_Support_List(based_on_Yocto_2.1)_am335x|<font color="#0066cc">OS Support List(based on Yocto 2.1)</font>]]
 
 
 
=== '''User Guide''' ===
 
 
 
*[[IoTGateway/BSP/Linux/AM335x/AM335x_LBV6_User_Guide|<font color="#0066cc">Version 1 (based on ti-sdk-am335x-evm-06.00.00.00 ) User Guide</font>]]
 
*[[IoTGateway/BSP/Linux/AM335x/AM335x_LBV2_User_Guide|<span class="mw-headline" id="version_1_.28based_on_ti-sdk-am335x-evm-06.00.00.00_.29"><font color="#0066cc">Version 2 (based on ti-sdk-am335x-evm-02.00.00.00.00 ) User Guide</font></span>]]
 
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/AM57xx/AM57xx_User_Guide <span class="mw-headline" id="version_1_.28based_on_ti-sdk-am335x-evm-06.00.00.00_.29"><font color="#0066cc">Version&nbsp;3 (based on Yocto 2.1) User Guide</font></span>]
 
**[[Function_Test|Function Test]] 
 
*[[Yocto_Linux_BSP_Ver.4_User_Guide_for_AM57xx/AM335x_series|<span class="mw-headline" id="version_1_.28based_on_ti-sdk-am335x-evm-06.00.00.00_.29"><font color="#0066cc">Version&nbsp;4 (based on Yocto 2.4) User Guide</font></span>]]
 
**<font color="#0066cc">Function Test</font> 
 
 
 
=== '''FAQ''' ===
 
 
 
*[[IoTGateway/BSP/Linux/AM335x/FAQ|FAQ]]
 
 
 
= '''AM57xx''' =
 
 
 
=== '''OS Support list (Get BSP & Image)''' ===
 
 
 
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/AM57xx/OS_Support_List <font color="#0066cc">OS Support List(base on Yocto 2.1)</font>]
 
 
 
=== '''User Guide''' ===
 
 
 
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/AM57xx/AM57xx_User_Guide <font color="#0066cc">Version 1 (based on Yocto 2.1) User Guide</font>]
 
*[[Getting_Started|Function Test]]
 
 
 
= '''AM62xx''' =
 
 
 
=== '''OS Support list (Get Image)''' ===
 
 
 
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/AM62xx/OS_Support_List <font color="#0066cc">OS Support List(base on Yocto 3.1)</font>]
 
 
 
=== '''User Guide(Get SDK )''' ===
 
 
 
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/AM62xx/AM62xx_User_Guide <font color="#0066cc">Version 1 (based on Yocto 3.1) User Guide</font>]
 
  
= '''RK3288''' =
+
<span style="color:#000000;">'''Path for'''</span><span style="color:#FF0000;">'''RK3399 (64)'''</span><span style="color:#000000;">:/usr/bin/aarch64-linux-gnu-gcc</span>
  
=== '''OS Support list''' ===
+
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/usr/bin/aarch64-linux-gnu-g++
 
 
*[[RK3288_OS_Support_List_(Base_On_Debian9)|OS Support List Debian9]]
 
*[[OS_Support_List_Debian10|OS_Support_List_Debian10]]
 
 
 
=== '''User Guide''' ===
 
 
 
*[[Linux_BSP_User_Guide_for_rk3288_series_Debian9|Linux BSP build and update images.&nbsp;]]
 
*[[Environment_set_up.|Environment_set_up.]]
 
*[[How_to_do.|How_to_do.]]
 
*[http://ess-wiki.advantech.com.tw/view/RK3288_qt5Creator RK3288_qt5Creator]
 
*[[Qt5Creator_toolchain_Qt_5.11.3|qt5Creator_toolchain_Qt_5.11.3]]
 
*[[How_to_flash_the_Debian_image_into_RSB-4680|How_to_flash_the_Debian_image_into_RSB-4680]]
 
 
 
=== '''FQA''' ===
 
 
 
= '''RK3399''' =
 
 
 
=== '''OS Support List''' ===
 
 
 
*[[RISC_series_(RSB-3710/RSB-4710/ROM-5780)_Debian9|RISC_series_(RSB-3710/RSB-4710/ROM-5780)_Debian9]]&nbsp;  
 
*[[RISC_series_(RSB-3710/RSB-4710/ROM-5780)_Debian10|RISC_series_(RSB-3710/RSB-4710/ROM-5780)_Debian10]]&nbsp;  
 
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/RK3399/OS_Support_List DS series (DS-100/DS-100Lite/EIS-D620) Debian9]
 
 
 
=== '''User Guide''' ===
 
 
 
RISC&nbsp;series(RSB-3710/RSB-4710/ROM-5780)
 
 
 
*[http://ess-wiki.advantech.com.tw/view/Debian_BSP_User_Guide_for_rk3399_series_risc(RSB4710). Linux BSP User Guide for rk3399 series Debian9/Debian10]
 
*[http://ess-wiki.advantech.com.tw/view/Getting_Start_(RSB4710). Getting Start]
 
*[http://ess-wiki.advantech.com.tw/view/MAC_Address MAC_Address]
 
*[http://ess-wiki.advantech.com.tw/view/Qt5Creator <font color="#0066cc">Qt5Creator</font>]
 
*[[Qt5Creator_toolchain_Qt_5.11.3|<font color="#0066cc">Qt5Creator_toolchain_Qt_5.11.3</font>]]
 
 
 
DS-100&nbsp;
 
 
 
*[[IoTGateway/BSP/Linux/Linux_BSP_User_Guide_Debian9_for_rk|Linux BSP User Guide for rk3399 series Debian9]]
 
*[[IoTGateway/BSP/Linux/Linux_BSP_User_Guide_DeviceOn|Linux BSP User Guide for rk3399 series DeviceOn]]
 
*[[IoTGateway/BSP/Linux/Linux_BSP_User_Guide_SGI|Linux BSP User Guide for SGI [DMS-SA53]]]
 
 
 
=== '''FQA''' ===
 
 
 
= '''RK3568''' =
 
 
 
=== '''OS Support List''' ===
 
 
 
[[RISC_series_RK3568_Linux|RISC_series (RSB-4810) Debian10]]
 
 
 
=== '''User Guide''' ===
 
 
 
RISC&nbsp;series(RSB-4810 ROM-5880 KEDGE-350)
 
 
 
*[[Linux_BSP_User_Guide_for_rk3568_series_Debian10|Linux_BSP_User_Guide_for_rk3568_series_Debian10]]
 
*[[Linux_BSP_User_Guide_for_rk3568_series_Debian11|Linux_BSP_User_Guide_for_rk3568_series_Debian11]]
 
*[[Getting_Start_RK3568|Getting Start]]
 
*MAC_Address
 
*Qt5Creator
 
*Qt5Creator_toolchain_Qt_5.11.3
 
  
 
&nbsp;
 
&nbsp;
  
= '''RK3588''' =
+
<span style="color:#000000;">'''Path for'''</span><span style="color:#FF0000;">'''RK3288(32)'''</span><span style="color:#000000;">:/usr/bin/arm-linux-gnueabihf-gcc</span>
  
=== '''OS Support List''' ===
+
<span style="color:#FF0000;">'''&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;'''</span><span style="color:#000000;">/usr/bin/arm-linux-gnueabihf-g++</span>
  
[[RISC_series_RK3588_Linux|RISC_series (ROM-6881) Debian11]]
+
The following figure uses rk3568&nbsp; as an example :
  
 +
[[File:QtIXDKY6.png|RTENOTITLE]]
  
=== '''User Guide''' ===
+
== Config QtCreator ---- Qt Debuggers ==
 
 
RISC&nbsp;series(ROM-6881)
 
 
 
*[[Linux_BSP_User_Guide_for_rk3588_series_Debian11|Linux_BSP_User_Guide_for_rk3588_series_Debian11]]
 
*[[Getting_Start_RK3588|Getting Start]]
 
*[[RK3588/Linux/Main_Manual|Manual (Building...)]]
 
*MAC_Address
 
*Qt5Creator
 
*Qt5Creator_toolchain_Qt_5.11.3
 
 
 
&nbsp;
 
  
= '''RK_ALL''' =
+
1. Select Debuggers -->
  
=== '''User Guide''' ===
+
2. The Debuggers selection system buildin,If no Auto-detected , just Add it:
  
All rockchip platforms (RK3288、RK3399、RK3568、RK3588 etc) have similar funtions.
+
&nbsp; &nbsp; Path: /usr/bin/gdb
  
Here are the summary FAQs&nbsp;:&nbsp;
+
[[File:QtGZ6D5.png|RTENOTITLE]]
  
*[[RK_PLatform_Quick_Start|Quick Start]]
+
== Config QtCreator ---- Qt Cmakes ==
*[[RK_ALL_Qt_Toolchain|QT ToolChain]]
 
*[[RK_ALL_NPU|NPU]]
 
  
= '''nVidia''' =
+
1. Select Cmake -->
  
=== '''OS Support List''' ===
+
2. Similarly,Cmake also uses the system Cmake , if no Auto-detected , just Add it&nbsp;:
  
*[[IoTGateway/BSP/Linux/nVidia_Jetson_OS_Support_List|nVidia Jetson OS Support List]]
+
&nbsp; &nbsp; Path: /usr/bin/Cmake
  
=== '''User Guide''' ===
+
[[File:Qt8D.png|RTENOTITLE]]
  
*[[Linux_BSP_User_Guide_for_jetson_series|Linux BSP build for jetson series]]
+
== Config QtCreator ---- Qt kits ==
  
=== '''Jetbot''' ===
+
1. Select Kits&nbsp;
  
*[[Jetbot_ROS|Jetbot ROS]]
+
2. Configure "Qt version"、"Compilers"、"Debuggers"&nbsp;and "Cmake"&nbsp;configurations in Kits.
  
=== '''Jetson AI''' ===
+
&nbsp; &nbsp; &nbsp;The picture below uses rk3568&nbsp;as an example:
  
*[[Deploying_Deep_Learning|Deploying Deep Learning]]  
+
[[File:T4KDS.png|RTENOTITLE]]
  
=== '''DevcieOn''' ===
+
[[File:QtZ52.png|RTENOTITLE]]
  
*[[DeviceOn|DevinOn]]
+
== Creating the Project ==
  
=== '''FQA''' ===
+
#Bring up "New" dailog using "File" -> "New File or Project..."
 +
#Select "Applications" -> 'Qt Widgets Application"
 +
#Click "Choose..."
 +
#;[[File:RK3399 Project 001.png|RTENOTITLE]] 
 +
#Use "Hello" as name
 +
#Create in "/mnt/sda1/work/qt/qt_PJ"
 +
#Click "Next"
 +
#;[[File:RK3399 Qt Project local.png|RTENOTITLE]] 
 +
#Check "RK toolchain"
 +
#Click "Next".
 +
#;[[File:RK3399 Qt Project toolchain.png|RTENOTITLE]] 
 +
#Use default settings for "Class Information"
 +
#Click "Next"
 +
#;[[File:RK3399 QT Project last.png|RTENOTITLE]] 
 +
#Use default settings for "Project Management"
 +
#Click "Finish"
 +
#;[[File:RK3399 Qt Project last2.png|RTENOTITLE]] 
 +
#Double click "Hello.pro" to switch to editor window
 +
#In new project it is necessary to add following two lines into qt project file.
 +
#:<code>target.path = .<br/> INSTALLS += target</code>
 +
#;[[File:RK3399 Qt Project code002.png|RTENOTITLE]] 
 +
#Press "Ctrl+S" to save file.
 +
#Double click "mainwindow.ui" to switch to Design mode
 +
#Drag & drop one Label widget on main form, use property editor on the right side to change text and font size
 +
#;[[File:2015-01-30 174418.png|RTENOTITLE]]
 +
#;[[File:RK3399 Qt Project code003.png|RTENOTITLE]] 
 +
#Save all project files using "File" -> "Save All"
  
= '''LS1046''' =
+
== Building the Project ==
  
=== '''OS Support List''' ===
+
#Switch to "Projects" mode
 +
#Check if "build configuration" is set to "Debug".
 +
#;[[File:RK3399 Qt debug setting.png|RTENOTITLE]] 
 +
#Check if "Files to deploy" is correct
 +
#;[[File:RK3399 Qt run setting.png|RTENOTITLE]] 
 +
#Set environment variable DISPLAY in QtCreator -> Projects -> Run -> Run Environment. The value of DISPLAY is obtained from the rk3399. For example, execute instruction '''''echo $DISPLAY''''' on RK3399.
 +
#;[[File:RK3399 Qt ENV Display.png|RTENOTITLE]] 
 +
#Switch to "Edit" mode
 +
#Click "Build" using context menu of project "Hello"
 +
#;[[File:RK3399 Qt build start.png|RTENOTITLE]] 
 +
#The green "Build" bar means no error occured.
 +
#;[[File:RK3399 Qt build status.png|RTENOTITLE]] 
 +
#Press "Alt+4" to show "Compile Output".&nbsp;[[File:RK3399 Qt build output.png|RTENOTITLE]]
  
*[[OS_Support_List_(based_on_Ubutu_18.04)|OS Support List (based on Ubuntu 18.04)]]
+
== Deploying the Application ==
  
=== '''User Guide''' ===
+
#Click "Deploy" using context menu of project Hello[[File:RK3399 Qt deploy start.PNG|RTENOTITLE]]
 +
#The green "Deploy" bar indicates no error occured.[[File:RK3399 Qt deploy output.png|RTENOTITLE]]
  
*[[Linux_BSP_build_User_Guide_(LSDK20.12)|Linux BSP build User Guide (LSDK20.12)]]
+
== Debugging the Application ==
*[[Security_fuse_processor_(SFP)|Security fuse processor (SFP)]]
 
*[[LS1046A_-_Data_Path_Acceleration_Architecture_(DPAA)|Data Path Acceleration Architecture (DPAA)]]
 
  
=== '''Product&nbsp;''' ===
+
#Click debug icon to start debugging.
 +
#;[[File:RK3399 Qt debug start.png|RTENOTITLE]] 
 +
#Press "Alt+3" to show "Application Output"[[File:RK3399 Qt debug output.png|RTENOTITLE]]
 +
#The "Hello" shows up on primary display.
 +
#;[[File:RK3399 Qt result show.png|RTENOTITLE]] 
 +
#Click "stop" to stop debugging.
 +
#;[[File:RK3399 Qt debug stop.png|RTENOTITLE]] 
 +
#The default desktop returns back.[[File:RK3399 Qt default Desktop.png|RTENOTITLE]]
  
'''NXP LS1046A Cortex®-A72 COM Express Type 7 Computer-on-Module&nbsp;'''
+
= FAQ =
  
*[http://ess-wiki.advantech.com.tw/view/ROM-8720_user_guide ROM-8720 user guide]
+
== Cannot find Libraries ==
  
=== '''FAQ''' ===
+
When build, you may get the error like "cannot find -l<span style="color:#d35400;">'''xxxx'''</span>".
  
= '''ELAA''' =
+
"xxxx" is just an example of the library linked to your application.
  
*[[IoTGateway/BSP/Linux/ELAA/Document|Document]]
+
For example: "cannot find -lsqlite3"
*[http://forum.elaa-platform.org/ ELAA Developer Forum]
 
  
== Add on value ==
+
First find the library in toolchain path.
  
*[[SW_Service/API|SUSI 4.0]]
+
The following commands are taking "RK3568 libsqlite3" as example, other platforms are very similar.
*[[SW_Service/SUSI_IoT|SUSI IoT]]
+
<pre>cd /opt/toolchain_Qt_V5.11.3/rk3568/
*[[WISE-PaaS/RMM_Agent|RMM-Agent]]
+
find ./ -name libsqlite3.so*
 +
cd ./sysroot/usr/lib/aarch64-linux-gpu
 +
or
 +
cd ./sysroot/lib/aarch64-linux-gpu
 +
ln -s libsqlite3.so.0 libsqlite3.so
 +
</pre>
  
[[Category:BSP]]
+
If you cannot find the library you need in toolchain path, please do not hesitate to contact Advantech for help.

Revision as of 12:17, 2 April 2024

Preface

Qt has many versions, and may run on defferent OSs.But the toolchain we provide can fit them well.

It has the following advantages:

  • The compilation environment is consistent with runtime environment.
  • Good compatibility.
  • Good extensibility.

So the application compiled by the toolchain can run perfectly on our products. And the toolchain can be used on Debian or Ubuntu Desktop Operating System well.

If you meet any problems, please do not hesitate to contact Advantech for help.

Prerequisites

Debian10(buster) is highly recommended OS to develop.

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

Link arm-linux-gnu*-8 to arm-linux-gnu* and aarch64-linux-gnu*-8 to aarch64-linux-gnu*:

$ sudo su
$ cd /usr/bin
$ for f in $(ls arm-linux-gnu*-8);do ln -sf $f $(echo $f|sed "s/-8//");done 
$ for f in $(ls aarch64-linux-gnu*-8);do ln -sf $f $(echo $f|sed "s/-8//");done
$ exit

 

Installing cross toolchain

Please download cross compiler toolchain first.

RK3288(Password: gm9i)

RK3399(Password: 0kkn)

RK3568(Password: a887)

RK3588(Password: a887)

Then execute the following command to unzip the cross compiler tool to the /opt directory

For RK3288

$ sudo rm -rf /opt/toolchain_Qt_V5.11.3/rk3288/
$ sudo mkdir -p /opt/toolchain_Qt_V5.11.3/rk3288/
$ sudo tar -zxf rk3288_toolchain_Qt_V5.11.3_*.tar.gz -C /opt/toolchain_Qt_V5.11.3/rk3288/

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 /opt/toolchain_Qt_V5.11.3/rk3399/

For RK3568

$ sudo rm -rf /opt/toolchain_Qt_V5.11.3/rk3568/
$ sudo mkdir -p /opt/toolchain_Qt_V5.11.3/rk3568/
$ sudo tar -zxf rk3568_toolchain_Qt_V5.11.3_*.tar.gz -C /opt/toolchain_Qt_V5.11.3/rk3568/

For RK3588

$ sudo rm -rf /opt/toolchain_Qt_V5.15.2/rk3588/
$ sudo mkdir -p /opt/toolchain_Qt_V5.15.2/rk3588/
$ sudo tar -zxf rk3588_toolchain_Qt_V5.15.2_*.tar.gz -C /opt/toolchain_Qt_V5.15.2/rk3588/

Working within QtCreator

The following example is test on QT5.9.5(qmake version) of Ubuntu18.04.There may be a few differences on other operating system,but the main steps are the same.

Use qtcreator to configure a complete build kit.

Config QtCreator ---- Qt Versions

1. Select Tools --> options --> 

RTENOTITLE

2. Select Qt versions --> Manual -->Add -->

    Path:/opt/toolchain_Qt_V5.11.3/RK3568 or RK3399 or RK3288/sysroot/qmake

    Path:/opt/toolchain_Qt_V5.15.2/RK3588/sysroot/qmake

RTENOTITLE

RTENOTITLE

Config QtCreator ---- Qt Complers

1. Select compilers -->

2. Because Gcc and G++ has been installed earlier, the compiler will generally detect it automatically.

    If no Auto-detected, just Add it.

Path forRK3588 (64):/usr/bin/arrch64-linux-gnu-gcc         

                                   /usr/bin/aarch64-linux-gnu-g++

Path forRK3568 (64):/usr/bin/arrch64-linux-gnu-gcc         

                                   /usr/bin/aarch64-linux-gnu-g++

 

Path forRK3399 (64):/usr/bin/aarch64-linux-gnu-gcc

                                   /usr/bin/aarch64-linux-gnu-g++

 

Path forRK3288(32):/usr/bin/arm-linux-gnueabihf-gcc

                                  /usr/bin/arm-linux-gnueabihf-g++

The following figure uses rk3568  as an example :

RTENOTITLE

Config QtCreator ---- Qt Debuggers

1. Select Debuggers -->

2. The Debuggers selection system buildin,If no Auto-detected , just Add it:

    Path: /usr/bin/gdb

RTENOTITLE

Config QtCreator ---- Qt Cmakes

1. Select Cmake -->

2. Similarly,Cmake also uses the system Cmake , if no Auto-detected , just Add it :

    Path: /usr/bin/Cmake

RTENOTITLE

Config QtCreator ---- Qt kits

1. Select Kits 

2. Configure "Qt version"、"Compilers"、"Debuggers" and "Cmake" configurations in Kits.

     The picture below uses rk3568 as an example:

RTENOTITLE

RTENOTITLE

Creating the Project

  1. Bring up "New" dailog using "File" -> "New File or Project..."
  2. Select "Applications" -> 'Qt Widgets Application"
  3. Click "Choose..."
    RTENOTITLE
  4. Use "Hello" as name
  5. Create in "/mnt/sda1/work/qt/qt_PJ"
  6. Click "Next"
    RTENOTITLE
  7. Check "RK toolchain"
  8. Click "Next".
    RTENOTITLE
  9. Use default settings for "Class Information"
  10. Click "Next"
    RTENOTITLE
  11. Use default settings for "Project Management"
  12. Click "Finish"
    RTENOTITLE
  13. Double click "Hello.pro" to switch to editor window
  14. In new project it is necessary to add following two lines into qt project file.
    target.path = .
    INSTALLS += target
    RTENOTITLE
  15. Press "Ctrl+S" to save file.
  16. Double click "mainwindow.ui" to switch to Design mode
  17. Drag & drop one Label widget on main form, use property editor on the right side to change text and font size
    RTENOTITLE
    RTENOTITLE
  18. Save all project files using "File" -> "Save All"

Building the Project

  1. Switch to "Projects" mode
  2. Check if "build configuration" is set to "Debug".
    RTENOTITLE
  3. Check if "Files to deploy" is correct
    RTENOTITLE
  4. Set environment variable DISPLAY in QtCreator -> Projects -> Run -> Run Environment. The value of DISPLAY is obtained from the rk3399. For example, execute instruction echo $DISPLAY on RK3399.
    RTENOTITLE
  5. Switch to "Edit" mode
  6. Click "Build" using context menu of project "Hello"
    RTENOTITLE
  7. The green "Build" bar means no error occured.
    RTENOTITLE
  8. Press "Alt+4" to show "Compile Output". RTENOTITLE

Deploying the Application

  1. Click "Deploy" using context menu of project HelloRTENOTITLE
  2. The green "Deploy" bar indicates no error occured.RTENOTITLE

Debugging the Application

  1. Click debug icon to start debugging.
    RTENOTITLE
  2. Press "Alt+3" to show "Application Output"RTENOTITLE
  3. The "Hello" shows up on primary display.
    RTENOTITLE
  4. Click "stop" to stop debugging.
    RTENOTITLE
  5. The default desktop returns back.RTENOTITLE

FAQ

Cannot find Libraries

When build, you may get the error like "cannot find -lxxxx".

"xxxx" is just an example of the library linked to your application.

For example: "cannot find -lsqlite3"

First find the library in toolchain path.

The following commands are taking "RK3568 libsqlite3" as example, other platforms are very similar.

cd /opt/toolchain_Qt_V5.11.3/rk3568/
find ./ -name libsqlite3.so*
cd ./sysroot/usr/lib/aarch64-linux-gpu
or
cd ./sysroot/lib/aarch64-linux-gpu
ln -s libsqlite3.so.0 libsqlite3.so

If you cannot find the library you need in toolchain path, please do not hesitate to contact Advantech for help.