===== Setup Qt Creator for STKa8MPxL ===== ====Prerequisites==== * BSP built according to [[en:arm:tqma8mpxl:linux:yocto:quickstart_yocto| quickstart guide]], but instead of ''bitbake tq-image-weston'' you have to use ''bitbake tq-image-qt5'' * Build Yocto SDK based on the current RootFS configuration, installed on the development host. See [[en:arm:tqma8mpxl:linux:yocto:how_to:development_host:yocto_sdk |Build Yocto SDK]] how to build it * Configured SSH login on target. See [[en:arm:tqma8mpxl:linux:yocto:how_to:target#setup_ssh_connection|setup ssh connection]] * Configured Network connection to the development host ==== Additional Yocto Packages ==== The following has to be added to the local.conf file in the build directory or to your custom image recipe: IMAGE_INSTALL_append = " openssh-sftp-server" ==== Setup Development Host ==== === Set Up Qt Creator === Download the Qt online installer from the following link: \\ [[https://d13lb3tujbc8s0.cloudfront.net/onlineinstallers/qt-unified-linux-x64-4.1.1-online.run]] \\ \\ Afterwards make the Qt installer file executable and run the Qt installer. You will need a Qt account for the installation. Follow the installation wizard instructions and install Qt 5.15.0.\\ {{:en:arm:tqma8mpxl:linux:yocto:how_to:yocto_qt_installation_folder.png?nolink&800|}} {{:en:arm:tqma8mpxl:linux:yocto:how_to:yocto_qt_installation_components.png?nolink&800|}} \\ The next step is to add the environment setup of the Yocto SDK to the first line (above the shebang) of the file qtcreator.sh script.\\ If the install location has not been changed the qtcreator.sh is located in **~/Qt/Tools/QtCreator/bin/qtcreator.sh** source /opt/fsl-imx-wayland/5.4-zeus/environment-setup-aarch64-poky-linux === Run Qt Creator === change to the directory where the qtcreator.sh file is located and execute the following command: sudo sh qtcreator.sh If qtcreator.sh returns ''source: not found'', before sudo sh qtcreator.sh, enter ''sudo dpkg-reconfigure dash'' and choose no. If qtcreator.sh returns ''qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.'', enter ''sudo apt-get install --reinstall libxcb-xinerama0''. === Configure Qt creator === == Setup SSH connection == - Go to **Tools > Options > Devices > click Devices** - Click **Add > Generic Linux Device > Start Wizard** - Change the name to "STKa8MPXL" and set up the connection. {{:en:arm:tqma8mpxl:linux:yocto:how_to:yocto_qt_ssh.png?nolink&800|}} ==== Add compiler ==== - Go to **Tools > Options > Kits > click Compilers** - Click **Add** and select **GCC > C** - Change Name to **TQMa8MPXL** - Set **Compiler path** to /opt/fsl-imx-wayland/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++ - Set the following values for **ABI** from the dropdown menus: ^ processor architecture ^ operating system ^ OS flavor ^ binary format ^ system architecture ^ | arm | linux | generic | elf | 64bit | - Click **Add** and select **GCC > C++** - Change Name to **TQMa8MPXL** - Set **Compiler path** to /opt/fsl-imx-wayland/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++ - Set the following values for **ABI** from the dropdown menus: ^ processor architecture ^ operating system ^ OS flavor ^ binary format ^ system architecture ^ | arm | linux | generic | elf | 64bit | {{:en:arm:tqma8mpxl:linux:yocto:how_to:yocto_qt_compiler.png?nolink&800|}} == Add new Cross Compiled Qt Version == - Click **Qt Versions** on the **Kits** panel - Click **Add** - Locate the qmake file in /opt/fsl-imx-wayland/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/qmake If the qmake file has been auto-detected by Qt Creator qmake has not to be added manually. {{:en:arm:tqma8mpxl:linux:yocto:how_to:yocto_qt_qmake.png?nolink&800|}} == Add new Kit == - Click on **Kits** in the **Kits** panel - Click **Add** and set the following: **Name** STKa8MPXL\\ **Device Type** Generic Linux Device\\ **Device** STKaMPXL (default for Generic Linux)\\ **Sysroot** /opt/fsl-imx-wayland/5.4-zeus/sysroots/aarch64-poky-linux\\ **Compiler** C: TQMa8MPXL C++: TQMa8MPXL\\ **Qt version** Qt 5.13.2 (System)\\ {{:en:arm:tqma8mpxl:linux:yocto:how_to:yocto_qt_kit.png?nolink&800|}} == Run Example == * Go to **Welcome > Examples > click Qt 5.15.0 GCC 64 Bit** * Search for Digital Clock Example * On **Configure Project** select the **STKa8MPXL** and click **Configure Project** * Click on Build (CTRL + B) and afterwards on Run (CTRL + R) {{:en:arm:tqma8mpxl:linux:yocto:how_to:yocto_example.png?nolink&800|}} {{:en:arm:tqma8mpxl:linux:yocto:how_to:yocto_example_run.png?nolink&800|}}