Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:arm:tqma8xx:linux:yocto:how_to [2019/10/21 17:41] – Added sections SSH and Qt Creator liedmann | en:arm:tqma8xx:linux:yocto:how_to [2022/09/17 12:58] (current) – remove sub navigation liedmann | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ~~NOCACHE~~ | + | ~~NOCACHE~~ |
~~NOTOC~~ | ~~NOTOC~~ | ||
- | <WRAP round important> | + | <embed en: |
- | <embed en: | + | |
<label product_type> | <label product_type> | ||
<label lang> | <label lang> | ||
Line 13: | Line 12: | ||
<label bsp_name_head> | <label bsp_name_head> | ||
</ | </ | ||
- | \\ | ||
- | \\ | ||
- | ===== SSH connection on STKa8Xx ===== | ||
- | <WRAP round important> | ||
- | |||
- | <WRAP round info>For the sake of simplicity password authentification can be used for SSH.</ | ||
- | |||
- | === Setup Yocto build environment === | ||
- | |||
- | The OpenSSH sftp server is not installed into the image by default, add the following to your local.conf to install it. | ||
- | |||
- | < | ||
- | |||
- | |||
- | === Setup on Target === | ||
- | |||
- | To setup a password for the default user root, | ||
- | execute the command **passwd root** and set your password. | ||
- | |||
- | === Modify SSH configuration === | ||
- | |||
- | Uncomment the following options in **/ | ||
- | with a password on the STKa8Xx. | ||
- | |||
- | < | ||
- | PasswordAuthentication yes | ||
- | </ | ||
- | |||
- | ===== Setup Qt Creator with Yocto build environment ===== | ||
- | |||
- | ==== Building Yocto SDK ==== | ||
- | |||
- | Building the toolchain requires a Yocto build environment configured for meta-tq or ci-meta-tq | ||
- | The setup of the build environment is described on the corresponding Yocto quickstart of the module. | ||
- | |||
- | <WRAP round important> | ||
- | |||
- | After the Yocto build environment the SDK can be built by the following command: | ||
- | < | ||
- | \\ | ||
- | <WRAP round info> | ||
- | |||
- | |||
- | |||
- | ==== Installing Yocto SDK ==== | ||
- | |||
- | After building meta-toolchain-qt5 the SDK file is located in the following path of the build directory **tmp/ | ||
- | |||
- | Execute the *sh file to install the SDK, the default path is set to **/ | ||
- | |||
- | ==== Set Up Qt Creator ==== | ||
- | |||
- | Download [[https:// | ||
- | After downloading make the Qt installer file executable and run the Qt installer. Follow the installation wizard instructions.\\ | ||
- | |||
- | 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 **~/ | ||
- | |||
- | < | ||
- | |||
- | ==== Run Qt Creator ==== | ||
- | |||
- | change to the directory where the qtcreator.sh file is located and execute the following command: | ||
- | < | ||
- | |||
- | <WRAP round important> | ||
- | |||
- | |||
- | ==== Configure Qt creator ==== | ||
- | |||
- | === Setup SSH connection === | ||
- | |||
- | - Go to **Tools > Options > Devices** | ||
- | - Click **Add > Generic Linux Device > Start Wizard** | ||
- | - Change the name to " | ||
- | |||
- | {{: | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | < | ||
- | |||
- | === Add compiler === | ||
- | |||
- | - Go to **Tools > Options > Build & Run> click Compilers** | ||
- | - Click **Add** and select **GCC** | ||
- | - Change Name to **TQMa8Xx** | ||
- | - Set **Compiler path** to / | ||
- | - Set the following values for **ABI** from the dropdwon menus: | ||
- | |||
- | ^ processor architecture | ||
- | | arm | linux | generic | ||
- | |||
- | |||
- | {{: | ||
- | |||
- | === Add new Cross Compiled Qt Version === | ||
- | |||
- | - Click **Qt Versions** on the **Build & Run** panel | ||
- | - Click **Add** | ||
- | - Locate the qmake file in / | ||
- | <WRAP round info> If the qmake file has been auto-detected by Qt Creator qmake has not to be added manually.</ | ||
- | |||
- | {{: | ||
- | |||
- | === Add new Kit === | ||
- | |||
- | - Click on **Kits** in the **Build & Run** panel | ||
- | - Click **Add** and set the following: | ||
- | |||
- | **Name** STKa8Xx\\ | ||
- | **Device Type** Generic Linux Device\\ | ||
- | **Device** STKaXx (default for Generic Linux)\\ | ||
- | **Sysroot** / | ||
- | **Compiler** STKa8Xx\\ | ||
- | **Qt version** Qt 5.10.1\\ | ||
- | |||
- | |||
- | {{: | ||
- | |||
- | <WRAP hide> | ||
- | ==== Hello World Application ==== | ||
- | |||
- | * Open **File** menu and click **New Project** | ||
- | * Select **Qt Console Application** | ||
- | * Specify the location for the project and name it hello_world | ||
- | * Select the Kit STKa8Xx | ||
- | |||
- | |||
- | * Edit main.cpp | ||
- | < | ||
- | #include < | ||
- | #include < | ||
- | #include < | ||
- | |||
- | using namespace std; | ||
- | int main(int argc, char *argv[]) | ||
- | { | ||
- | QCoreApplication a(argc, | ||
- | cout<<" | ||
- | return a.exec(); | ||
- | } | ||
- | </ | ||
- | </ |